On Apr 19, 7:57 pm, Yasir <[email protected]> wrote:

> I have a javascript debugger now.. theres only one more issue to solve
> (hopefully)... that of the _IG_FetchXmlContent(url, _IG_Callback
> (handleFetchContent, city)); line
>
> this, I believe, should be replaced with GDownloadUrl, but not quite
> shore how to call the handleFetchContent method as is done here: (url,
> _IG_Callback(handleFetchContent, city))

Hi Yasir,

Neither _IG_FetchXmlContent nor _IG_Callback exists in the Maps API.
So you need to use GDownloadUrl (as you say), but also convert to a
standard callback form. In addition, the _IG_FetchXmlContent returns a
DOM document object, and has no direct equivalent in the Maps API;
you'll need to use the standalone GXml parser namespace.

So, instead of the _IG_FetchXmlContent call, you'll need code
something like the following:

    GDownloadUrl(url, function(text) {
      handleFetchContent(GXml.parse(text), city)
    });

Note that, unlike _IG_FetchXmlContent, GDownloadUrl is subject to the
Same Origin policy, so your XML will need to be on the same domain as
your map. With that restriction in mind, it seems to work.

One other note: in your handleFetchContent function, you're creating
GLatLng objects from text lat/lon data, which is known to be iffy. I'd
recommend sticking a couple of parseFloat calls in there.

String [aka the author ;^) ]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to