1 <h2 id=
"overview">Overview
</h2>
3 To start retrieving location information, you need to create a location watch
4 by calling $(ref:location.watchLocation), passing in
5 the location watch details via the
<code>requestInfo
</code> parameter:
8 <pre>chrome.location.watchLocation(name, requestInfo);
</pre>
10 You also need to add a listener
11 for the $(ref:location.onLocationUpdate) event.
12 Chrome will fire this event after you create your location watch, and
13 it will keep firing the event every time the geographic
14 location of the host machine changes, until you call $(ref:location.clearWatch).
18 to listen for location updates:
21 chrome.location.onLocationUpdate.addListener(function(position) {
22 console.log(JSON.stringify(position));