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
mouse_mode_set
Fired when the user changes the MouseMode of the Map object.
Event Result
An integer value based on the MouseMode that was set.
MouseMode | Value |
---|---|
Pan | 1 |
DrawPoint | 3 |
DrawLine | 4 |
DrawPolygon | 5 |
Example
var map = new Mapzania.Map("map-div", "LONDON", function () {
map.on("mouse_mode_set", function (data) {
console.log(data);
});
map.setMouseMode(Mapzania.MouseModes.Pan);
});