You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
This finds the users location via the Geolocation feature of html and centers the map on this point.
When using the .locate function the developer will want to know the users location at some point. To do this a bind event is used binding ('locationUpdate', position, accuracy)
*Note given the way the Geolocation api works it will keep updating to try and find higher accuracy so multiple results can be achieved.
What is returned is as follows:
position.coords
.accuracy
.altitude
.altitudeAccuracy
.heading
.latitude
.longitude
.speed
Also worth noting is that whilst the .locate() function can be used to draw the map it appears this does not happen until the users location has been determine so the .gotoPosition call should also be used?