diff -r 5dc02b23752f -r 3e2da88830cd examples/declarative/modelviews/webview/content/Mapping/map.html --- a/examples/declarative/modelviews/webview/content/Mapping/map.html Tue Jul 06 15:10:48 2010 +0300 +++ b/examples/declarative/modelviews/webview/content/Mapping/map.html Wed Aug 18 10:37:55 2010 +0300 @@ -25,6 +25,14 @@ } else { goToLatLng(new google.maps.LatLng(window.qml.lat,window.qml.lng)); } + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(function(position) { + initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); + window.qml.lat = initialLocation.lat; + window.qml.lng = initialLocation.lng; + goToLatLng(initialLocation); + }); + } } function goToAddress() { if (geocoder) {