sg

Salı, Aralık 27, 2005

Re: converting to Google Maps API...


This might work

var a="_18n58_72e50_";
var b=a.split("_");

var lat=b[1];
if (lat.indexOf("s") > -1) lat = "-" + lat;
lat=lat.replace("n",".");
lat=lat.replace("s",".");

var lng=b[2];
if (lng.indexOf("w") > -1) lng = "-" + lng;
lng=lng.replace("e",".");
lng=lng.replace("w",".");

var point = new GPOint(parseFloat(lng),parseFloat(lat));

Note that lat and lng are strings until we get to the parseFloat(). The
"-"+lat bit might look a little odd if you're thinking of the latitude
being a number.

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık