I am trying to build a popup window using Google Maps, while not using a preconfigured web page for the popup window (build the entire page from scratch). My popup window hangs whenever I add the line for the API key, and does not finish loading the page. I am sure that it's something simple, but I am not a Java guru. Any help on this would be greatly appreciated.
Below is the code I am generating to build the popup window. Thanks again.
Bruce
FYI, my onLoad event would normally have all of the mapping API code, but I need to get past this loading error first.
as already said why not have it as separate page, as the problem is almost certainly that the javascript parser is seeing the script tags inside the code and closing early. For example it probably sees the </script> and actually stops executing and code and sees a line of code broken in the middle.
----- Original Message ----- From: "Bruce Acomb" <baac...@gmail.com> To: "Google-Maps-API" <Google-Maps-API@googlegroups.com> Sent: Tuesday, March 07, 2006 5:43 PM Subject: Help With Google Map In Popup Window
> Everyone,
> I am trying to build a popup window using Google Maps, while not using > a preconfigured web page for the popup window (build the entire page > from scratch). My popup window hangs whenever I add the line for the > API key, and does not finish loading the page. I am sure that it's > something simple, but I am not a Java guru. Any help on this would be > greatly appreciated.
> Below is the code I am generating to build the popup window. Thanks > again.
> Bruce
> FYI, my onLoad event would normally have all of the mapping API code, > but I need to get past this loading error first.
I have already done this is a premade page, and it works fine. I am trying to do it via a webservice, so that I can have several different applications use it with litlle to no reuse of code, including a web page. Since I am doing this in a webservice, the syntax to pass back to the parent web page has been fun to work with (passing back the entire javascript in a stringbuilder variable to register on the parent web page).
If I remove the API key line and just run the onLoad script, it works fine.
I'm wondering if the google maps API does not know where to send the map info (since it is an unnamed page).
One problem is that "<script" and "</script" are magic words inside Javascript literal strings. I think the Javascript interpreter is required to treat them as active tags and assume that you've made an error that failed to close a previous string.
The Google API loader gets round this situation by doing this: