<script> var options = { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 }; function success(pos) { var crd = pos.coords; alert("Location changed. New location (" + crd.latitude + ", " + crd.longitude + ")"); console.log('Your current position is:'); console.log('Latitude : ' + crd.latitude); console.log('Longitude: ' + crd.longitude); console.log('More or less ' + crd.accuracy + ' meters.'); }; function error(err) { alert("Err"); console.warn('ERROR(' + err.code + '): ' + err.message); }; navigator.geolocation.getCurrentPosition(success, error, options); function initialize() { var mapProp = { center:new google.maps.LatLng(31.9497,35.9328), zoom:5, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); } google.maps.event.addDomListener(window, 'load', initialize);
center:new google.maps.LatLng(31.9497,35.9328)
crd.latitude
crd.longitude
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)