In API 2.0 versions, to determine the location by IP or by using the Geolocation API, developers had to
independently use the necessary methods and process the result (see the example).
The API 2.1 has a special built-in "geolocation" control, which allows you to display the user's location on the map.
This control is implemented by the control.GeolocationControl class, which corresponds to the 'geolocationControl' key.
To add a control to the map, you just need to specify the appropriate key in the map parameters.
In API 2.0 versions, to determine the location by IP or by using the Geolocation API, developers had to independently use the necessary methods and process the result (see the example).
The API 2.1 has a special built-in "geolocation" control, which allows you to display the user's location on the map. This control is implemented by the control.GeolocationControl class, which corresponds to the 'geolocationControl' key.
To add a control to the map, you just need to specify the appropriate key in the map parameters.