Location
- How to set current location of the map
// Custom location map.location({ lon:100, lat:16 }, true); // Geolocation map.location(longdo.LocationMode.Geolocation);
- first argument: latitude and longitude
- second argument: show animation , Default is false
- longdo.LocationMode.Geolocation: Set location to current user's geolocation
Example - How to get user’s location
// Crosshair location var result = map.location(); // Mouse location var result = map.location(longdo.LocationMode.Pointer);
- No argument: Get location at crosshair position mode
- longdo.LocationMode.Pointer: Get location at mouse position mode