Geolocate

Click the button to geolocate: find your current location. Your browser may ask your permission to provide this information to the page. This demo app doesn't send that info anywhere; but you could code your app to do something with it if you needed to. The accuracy of the geolocation will depend on the user's device.

The region has Static ID set to "mymap". The button has a dynamic action that executes the following javascript: $("#map_mymap").reportmap("geolocate");

The region has a Dynamic Action on the geolocate event which has two Actions:

  1. Set Value: set item P12_CENTRE to JavaScript Expression: this.data.lat+" "+this.data.lng
  2. Execute JavaScript Code: this.data.map.setZoom(15);

Tip: Zoom to user's current location