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
[layer_key]_layer_changed
Fired when the data in a layer changes. This can be due to map interaction such as zoom, pan or refresh.
[layer_key] is always the lowercase value of the layer key. For examples if the 'STREETS' layer changes, the event that is raised is 'streets_layer_changed'.
Event Result
A GeoJSON FeatureCollection.
Example
var map = new Mapzania.Map("map-div", "WORLD", function(){
map.on("streets_layer_changed", function (data) {
console.log(data);
});
map.usingLayer("STREETS)
.filterByText("StreetType=='HIGHWAY'")
.update();
});