Wasn't it Korebrits who wrote:
>
>or should i edit this part:
That's the bit.
If addresses[i] is already a set of coordinates, then skip the
geocoder.getLatLng() call.
In this particular page, there is only one address, which is a set of
coordinates:
addresses[0] = '-33.92232122943945,18.422527313232422';
so you could write
var point = GLatLng.fromUrlValue(addresses[i]);
If your default.js is used for other pages that might have street
addresses in the addresses[] array, then you'd have to test for that to
decide whether to geocode or not. One way to distinguish street
addresses from coordinates is to check for alphabetic characters
if (addresses[i].search(/[a-z]/i) > -1) {
// call the geocoder
} else {
// use the coordinates
}
[Note: don't forget the "> -1". String.search() returns the index of the
first match if there is one, which could be the zero'th character of the
String.]
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---