Mapbender

Description

This jQuery plugin grants access to the Mapbender API from a DOM element.  You can supply various arguments to achieve different things:

Passing no arguments will return the API object of the Mapbender element associated with the DOM element, usage

var api = $("#myelement").mapbender();

Passing an object serves as a setter: the object is the new API object associated with the DOM element, usage

$("#myelement").mapbender(new CustomApiObject());

Passing a string serves as an attribute getter.  It returns the value of any public attribute of the API object, usage

$("#myelement").mapbender("aSpecificAttribute")

Passing a function executes the function in the scope of the API object.  This is a shortcut to fetching the API object first, and then calling its method.  By this, you don’t need to check whether the API object exists, if none exists, the function is simply not executed.  Usage

$("#myelement").mapbender(function () {
       // this refers to the API object!!
       console.log(this.options);
});

Files

  • javascripts/core.php
  • lib/basic.js

Maintainer

http://www.mapbender.org/Christoph_Baudson

License

Copyright © 2009, Open Source Geospatial Foundation This program is dual licensed under the GNU General Public License and Simplified BSD license.  http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt

Summary
MapbenderThis jQuery plugin grants access to the Mapbender API from a DOM element.
Functions
cookiesEnablesChecks whether cookies are enabled in the browser
cloneObjectClone an object recursively.
getConjunctionCharreturns the character necessary to append to a string in order to attach more GET parameters

Functions

cookiesEnables

Description

Checks whether cookies are enabled in the browser

cloneObject

Mapbender.cloneObject = function (p,
c)

Description

Clone an object recursively.  Make sure the object is not circular!

Parameters

pan object

getConjunctionChar

Mapbender.getConjunctionChar = function (url)

Description

returns the character necessary to append to a string in order to attach more GET parameters

Parameters

urlthe online resource
Mapbender.cloneObject = function (p,
c)
Clone an object recursively.
Mapbender.getConjunctionChar = function (url)
returns the character necessary to append to a string in order to attach more GET parameters
Close