Information Technology Reference
In-Depth Information
var youMarker = new google.maps.MarkerImage(
"You_Marker.png",
new google.maps.Size(20, 34),
new google.maps.Point(0, 0),
new google.maps.Point(10, 34));
function supportsGeo () {
if (navigator.geolocation) {
return true;
} else {
return false;
}
}
function changeDiv (name, data) {
var div = document.getElementById(name);
if(div)
{
div.innerHTML = data;
}
}
function getLocation() {
if (supportsGeo()) {
myLatitude = "";
myLongitude = "";
navigator.geolocation.getCurrentPosition(
function(position) {
myLatitude = position.coords.latitude;
myLongitude = position.coords.longitude;
},
function(error) {
switch(error.code) {
case error.TIMEOUT:
alert ('Geolocation returned a timeout error');
break;
case error.POSITION_UNAVAILABLE:
alert ('Geolocation returned a position unavailable
error');
break;
case error.PERMISSION_DENIED:
alert ('Geolocation returned permission denied (did you
deny access?)');
break;
case error.UNKNOWN_ERROR:
alert ('Geolocation encountered an unknown error');
break;
}
}
);
alert("Confirm geolocation access before clicking OK");
}
myLatLong = new google.maps.LatLng(myLatitude, myLongitude);
}
function prepareMap() {
Search WWH ::




Custom Search