There are countless examples where this one is different in that it's in it's own class.

Simple usage
Include jQuery and geolocation.js (included in the link below)

$(document).ready(function () {

    var positionOptions = {
        timeout: Infinity,
        maximumAge: 0,
        enableHighAccuracy: true



There are stub functions to use for writing to a database or log file.

Full source on GitHub repo with link to Microsoft TechNet article which provides information on using geolocation and how to test on desktop and mobile devices.

Name:  F1.png
Views: 335
Size:  20.8 KB

Name:  F2.png
Views: 334
Size:  72.2 KB