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

Searching for the nearest object.

Save as filesEdit on JSFiddle

Use the GeoQueryResult object to create objects on the map from their JSON descriptions.

This example explains how to find objects in the selection that are nearest to an arbitrary object on the map (such as the metro). It also shows how to find the objects that are closest to the click.