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
clearFeatures
Clears the features from a layer.
Note: this works only for features that have been created client-side.
Layers which have server-side layer-sources will overwrite changes when they are updated (e.g. panning or zooming).
Parameters
No parameters.
Example
var map = new Mapzania.Map("map-div", "AFRICA");
map.usingLayer("MY_FEATURES")
.clearFeatures()
.update();