On Sep 17, 3:31 pm, simonsinus <[email protected]> wrote:
>
> Generating two different files with data from respectivly different
> origins?
> Well then I need two JS-Functions.
No you don't. Make two GDownloadUrl() calls and process the result
with a common function:
function processResult(data) { ... }
GDownloadUrl(myfile1,processResult);
GDownloadUrl(myfile2,processResult);
You can even use additional parameters if you take advantage of
function closure:
function processResult(data,type) { ... }
GDownloadUrl(myfile1,function(data){processResult(data,"typeA")});
GDownloadUrl(myfile2,function(data){processResult(data,"typeB")});
This last example may allow you to process real KML without your
"type" attribute included, because you can specify it outside the file
itself.
There are other methods, including using tailored XML and your own
parser rather than the standard KML. But as you haven't yet given a
link to let us into the secret of what you are actually doing, it's
not easy to say what would be best in your situation.
Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---