JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

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();