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
view_changed
Fired when the view is changed by the user due to panning or zooming.
Event Result
An json object with the following properties:
MouseMode | Result Type |
---|---|
boundingBox | GeoJSON bounding box |
zoom | integer |
center | GeoJSON Point |
Example
var map = new Mapzania.Map("map-div", "LONDON", function () {
map.on("view_changed", function (data) {
console.log(data);
});
map.fitToBoundingBox([10,10,20,20]);
});