JS API
- Parameters
- Options
- Example
- Methods
- fitToBoundingBox
- getBoundingBox
- getInitialBoundingBox
- getLayers
- getMouseMode
- off
- on
- once
- refresh
- reset
- setMouseMode
- usingLayer
- usingNewLayer
- Events
- Parameters
- Example
- Methods
- addFeature
- addFeatureCollection
- bringForwards
- bufferGeometry
- changeProperties
- clearFilters
- clearFeatures
- clearStyle
- clipByFeatureCollection
- convertToCentroids
- filterByBoundingBox
- filterByFeatureCollection
- filterByNearest
- filterByText
- getFeatureCollection
- hide
- sendBackwards
- show
- style
- update
- usingFeature
Example
// no callback or options
var map = new Mapzania.Map("map-div", "LONDON");
// options only
var map = new Mapzania.Map("map-div", "LONDON", {
debug: true,
toolbar: {
layout: Mapzania.Toolbar.Layouts.Standard
}
});
// callback only
var map = new Mapzania.Map("map-div", "LONDON", function() {
console.log("Map started");
});
// options and callback
var map = new Mapzania.Map("map-div", "LONDON", {
debug: true,
toolbar: {
layout: ["ZoomIn", "ZoomOut"]
}
}, function() {
console.log("Map started");
});
// external server
var map = new Mapzania.Map("map-div", "LONDON", {
server: "www.mapzania.com/mz"
});