On Aug 27, 8:49 am, ewjsong <[EMAIL PROTECTED]> wrote:
> I'm a beginner and I just started to create a simple google map by
> following the example from google site. However, I have problem to get
> GLatLng value. Here is my code:
>
> function initialize() {
> if (GBrowserIsCompatible()) {
> map = new GMap2(document.getElementById("map_canvas"));
> geocoder = new GClientGeocoder();
> //map.setCenter(new GLatLng(37.4419, -122.1419), 13);
> alert(geocoder.getLatLng("1260 Lancaster Dr. S.E. Salem OR"));
>
> }
> }
>
> I commented out the sample code which is not the value I wanted, but I
> got "undefined" return instead, no actual GLatLng value. Please help!The geocoder is asynchronous. You have to wailt for the response to come back. Mike Williams tutorial should give you some working examples (or the documentation...) http://econym.googlepages.com/index.htm -- Larry --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
