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

Adding a GeoJSON file to the map from the maps constructor

Save as filesEdit on JSFiddle

The example shows how to display data exported from the maps constructor on the map using ObjectManager. The JQuery.getJSON() function is used for loading the data. As long as the data is loaded, let's specify all neccessary properties (e.g. the balloon content) and add them to the objects manager.

For more information on the data export, see the documentation.

Note that the object coordinates are set in the order "longitude, latitude". Since the API uses "latitude, longitude" by default, the "coordorder" parameter with the "lotlang" value must be passed when enabling the API. For more information, see the section Enabling the API.

Пишете на JavaScript? У нас есть вакансии
Mon Oct 31 2022 13:07:35 GMT+0300 (Moscow Standard Time)