This set of examples demonstrates usage of the <geolocation> element (also see the specification).
- Basic
<geolocation>example: Basic usage of the element to return geo data, with Geolocation API fallback. - Basic
<geolocation>watch example: Basic usage of the element to return geo data, with Geolocation API fallback, which continuously returns data each time the user's position changes. - Embedded map example: Uses
<geolocation>to return geo data, which is then used to plot the user's location on a map generated using Leaflet JS. - Exploring invalid reasons: Provides a control to apply different styles to a
<geolocation>element that make it invalid, and reports theinvalidReasonfor each one. - Initial permission status example: Shows how to use the
initialPermissionStatusproperty to provide appropriate instructions to the user based on thegeolocationpermission on page load.