diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
commit | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch) | |
tree | 58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/declarative/modelviews/webview/content/Mapping | |
parent | ddb22795641253a026b72f752ebc769745dd41be (diff) | |
download | Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/declarative/modelviews/webview/content/Mapping')
-rwxr-xr-x | examples/declarative/modelviews/webview/content/Mapping/map.html | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/examples/declarative/modelviews/webview/content/Mapping/map.html b/examples/declarative/modelviews/webview/content/Mapping/map.html deleted file mode 100755 index a98da54..0000000 --- a/examples/declarative/modelviews/webview/content/Mapping/map.html +++ /dev/null @@ -1,60 +0,0 @@ -<html> -<head> -<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> -<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> -<script type="text/javascript"> - var geocoder - var map - function goToLatLng(latlng,bounds) { - if (map) { - map.setCenter(latlng) - map.fitBounds(bounds) - } else { - var myOptions = { - zoom: 8, - center: latlng, - mapTypeId: google.maps.MapTypeId.ROADMAP - }; - map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); - } - } - function initialize() { - geocoder = new google.maps.Geocoder(); - if (window.qml.address) { - goToAddress() - } 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) { - var req = { - address: window.qml.address, - } - if (map) - req.bounds = map.getBounds() - window.qml.status = "Loading"; - geocoder.geocode(req, function(results, status) { - if (status == google.maps.GeocoderStatus.OK) { - window.qml.status = "Ready"; - goToLatLng(results[0].geometry.location,results[0].geometry.bounds); - } else { - window.qml.status = "Error"; - } - }); - } - } -</script> -</head> -<body onload="initialize()" leftmargin="0px" topmargin="0px" marginwidth="0px" marginheight="0px"> - <div id="map_canvas" style="width:100%; height:100%"></div> -</body> -</html> |