Version:
Popular examples
Map
Geo objects
Balloon and hint
Controls
Hotspots
Regions
Clustering
GeoQuery
Behaviors and events
Search on a map
Traffic
User's location
Routing
YMapsML
GeoXML
ObjectManager
Modular system
Panoramas
External modules

Filtering objects

Save as filesEdit on JSFiddle

ObjectManager - A class for adding a large number of objects to the map without needing to create placemarks and add them to the map individually.

You can filter the objects added to the ObjectManager using the setFilter method. The method sets the filter function for objects. It accepts a single object added to the ObjectManager. If the function returns true, the object will be processed. If false, the object will be excluded from further processing. You can also pass a string as the filter. The following keywords are available in the filter string:

  • options – Accessing the object's options.
  • properties – Accessing the object's data.
  • geometry – Accessing the object's geometry.
  • id – Accessing the object's id.
You can also specify as the filter an expression that returns true or false.