A leaflet control plugin for tracking gps position
Tested in Leaflet 0.6.4
Adding the search control to the map:
map.addControl( new L.Control.Gps() );
and insert leaflet-gps.css styles to your css page
I recommend a chrome extension: 'Manual Geolocation' for simulate gps device and set realtime position
https://chrome.google.com/webstore/detail/manual-geolocation/mfodligkojepnddfhkbkodbamcagfhlo
Source code:
https://github.com/stefanocudini/leaflet-gps
https://bitbucket.org/zakis_/leaflet-gps
Demos: