Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Sample documentation

Damon Oehlman edited this page Jul 12, 2011 · 1 revision
  • .locate();

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?