// (90 * 1000000)) { alert(' Latitude must be between -90 to 90. '); document.getElementById("latbox1").value=''; return;}
longitude1 = Math.abs( Math.round(longitude * 1000000.));
if(longitude1 > (180 * 1000000)) { alert(' Longitude must be between -180 to 180. '); document.getElementById("lonbox1").value=''; return;}
var point = new GLatLng(latitude,longitude);
posset = 1;
if (zm == 0)
{
map.setMapType(G_HYBRID_MAP);
map.setCenter(point,16);
zm = 1;
}
else
{
map.setCenter(point);
}
var html = "";
html += html + "Latitude, Longitude
" + point.toUrlValue(6);
var baseIcon = new GIcon();
baseIcon.iconSize=new GSize(32,32);
baseIcon.shadowSize=new GSize(56,32);
baseIcon.iconAnchor=new GPoint(16,32);
baseIcon.infoWindowAnchor=new GPoint(16,0);
var thisicon = new GIcon(baseIcon, "http://itouchmap.com/i/blue-dot.png", null, "http://itouchmap.com/i/msmarker.shadow.png");
var marker = new GMarker(point,thisicon);
GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
map.addOverlay(marker);
GEvent.trigger(marker, "click");
}
function showLatLong1(latitude, latitudem,latitudes, longitude, longitudem, longitudes) {
if(latitude < 0) { latsgn = -1; }
alat = Math.abs( Math.round(latitude * 1000000.));
if(alat > (90 * 1000000)) { alert(' Degrees Latitude must be between -90 to 90. '); document.getElementById("latbox1m").value=''; document.getElementById("latbox1md").value=''; document.getElementById("latbox1ms").value=''; return; }
latitudem = Math.abs(Math.round(latitudem * 1000000.)/1000000); //integer
absmlat = Math.abs(Math.round(latitudem * 1000000.)); //integer
if(absmlat >= (60 * 1000000)) { alert(' Minutes Latitude must be between 0 to 59. '); document.getElementById("latbox1md").value=''; document.getElementById("latbox1ms").value=''; return;}
latitudes = Math.abs(Math.round(latitudes * 1000000.)/1000000);
absslat = Math.abs(Math.round(latitudes * 1000000.));
if(absslat > (59.99999999 * 1000000)) { alert(' Seconds Latitude must be between 0 and 59.99. '); document.getElementById("latbox1ms").value=''; return; }
if(longitude < 0) { lgsgn = -1; }
alon = Math.abs( Math.round(longitude * 1000000.));
if(alon > (180 * 1000000)) { alert(' Degrees Longitude must be between -180 to 180. '); document.getElementById("lonbox1m").value=''; document.getElementById("lonbox1md").value=''; document.getElementById("lonbox1ms").value=''; return;}
longitudem = Math.abs(Math.round(longitudem * 1000000.)/1000000);
absmlon = Math.abs(Math.round(longitudem * 1000000));
if(absmlon >= (60 * 1000000)) { alert(' Minutes Longitude must be between 0 to 59. '); document.getElementById("lonbox1md").value=''; document.getElementById("lonbox1ms").value=''; return;}
longitudes = Math.abs(Math.round(longitudes * 1000000.)/1000000);
absslon = Math.abs(Math.round(longitudes * 1000000.));
if(absslon > (59.99999999 * 1000000)) { alert(' Seconds Longitude must be between 0 and 59.99. '); document.getElementById("lonbox1ms").value=''; return;}
latitude = Math.round(alat + (absmlat/60.) + (absslat/3600.) ) * latsgn/1000000;
longitude = Math.round(alon + (absmlon/60) + (absslon/3600) ) * lgsgn/1000000;
var point = new GLatLng(latitude,longitude);
posset = 1;
if (zm == 0)
{
map.setMapType(G_HYBRID_MAP);
map.setCenter(point,16);
zm = 1;
}
else
{
map.setCenter(point);
}
var html = "";
html += html + "Latitude, Longitude
" + point.toUrlValue(6);
var baseIcon = new GIcon();
baseIcon.iconSize=new GSize(32,32);
baseIcon.shadowSize=new GSize(56,32);
baseIcon.iconAnchor=new GPoint(16,32);
baseIcon.infoWindowAnchor=new GPoint(16,0);
var thisicon = new GIcon(baseIcon, "http://itouchmap.com/i/blue-dot.png", null, "http://itouchmap.com/i/msmarker.shadow.png");
var marker = new GMarker(point,thisicon);
GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
map.addOverlay(marker);
GEvent.trigger(marker, "click");
}
function streetview()
{
if (posset == 0)
{
alert("Position Not Set. Please click on the spot on the map to set the street view point.");
return;
}
var point = map.getCenter();
var t1 = String(point);
t1 = t1.replace(/[() ]+/g,"");
var vpike_str = "http://www.vpike.com?e=" + t1;
var popup = window.open(vpike_str, "streetview");
popup.focus();
}
function googleearth()
{
if (posset == 0)
{
alert("Position Not Set. Please click on the spot on the map to set the Google Earth map point.");
return;
}
var point = map.getCenter();
var gearth_str = "http://itouchmap.com?r=googleearth&mt=Latitude-Longitude Point&ml=" + point.y+ "&mg=" + point.x;
var popup = window.open(gearth_str, "googleearth");
popup.focus();
}
function pictures()
{
if (posset == 0)
{
alert("Position Not Set. Please click on the spot on the map to set the photograph point.");
return;
}
var point = map.getCenter();
var pictures_str = "http://getpicture.mobi?r=pictures&mt=Latitude-Longitude Point&ml=" + point.y+ "&mg=" + point.x;
var popup = window.open(pictures_str, "pictures");
popup.focus();
}
function lotsize()
{
if (posset == 0)
{
alert("Position Not Set. Please click on the spot on the map to set the lot size map point.");
return;
}
var point = map.getCenter();
var t1 = String(point);
t1 = t1.replace(/[() ]+/g,"");
var vpike_str = "http://www.findlotsize.com?st=l1&e=" + t1;
var popup = window.open(vpike_str, "lotsize");
popup.focus();
}
function fc( point )
{
var html = "";
html += html + "Latitude, Longitude
" + point.toUrlValue(6);
var baseIcon = new GIcon();
baseIcon.iconSize=new GSize(32,32);
baseIcon.shadowSize=new GSize(56,32);
baseIcon.iconAnchor=new GPoint(16,32);
baseIcon.infoWindowAnchor=new GPoint(16,0);
var thisicon = new GIcon(baseIcon, "http://itouchmap.com/i/blue-dot.png", null, "http://itouchmap.com/i/msmarker.shadow.png");
var marker = new GMarker(point,thisicon);
GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
map.addOverlay(marker);
}
function createMarker(point, html)
{
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function()
{
marker.openInfoWindowHtml(html);
});
return marker;
}
function reset() {
map.clearOverlays();
document.getElementById("latbox").value='';
document.getElementById("latboxm").value='';
document.getElementById("latboxmd").value='';
document.getElementById("latboxms").value='';
document.getElementById("lonbox").value='';
document.getElementById("lonboxm").value='';
document.getElementById("lonboxmd").value='';
document.getElementById("lonboxms").value='';
marker = new GMarker(new GLatLng(20.0, -10.0), {draggable: true});
map.addOverlay(marker);
marker.setPoint(map.getCenter());
GEvent.addListener(marker, "dragend", function() {
var point = marker.getLatLng();
posset = 0;
if (zm == 0)
{map.setCenter(point,7); zm = 1;}
else
{map.setCenter(point);}
computepos(point);
});
GEvent.addListener(marker, "click", function() {
var point = marker.getLatLng();
marker.openInfoWindowHtml(marker.getLatLng().toUrlValue(6));
computepos (point);
});
}
function reset1() {
marker.setPoint(map.getCenter());
}
//]]>