You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Hello, I have never developed for google maps api until now. For 4
hours now I have been fiddling with the map not displaying at all on a
website, that I am writing.
Now what is the file? It is an example from the official website, ONLY
customized to use the XHTML doctype. That's right, only two top lines
are different.
The map does not display at all.
Facts that I have elaborated right now:
- it does not matter if you use the strict or transitional doctype
- it does not matter if you serve the page using text/html or
application/xhtml+xml
- no combination of meta tags or script elements would solve this
problem
- it does not matter if you wrap the map-creating JS code in <![CDATA
[ and ]]>
I've almost lost my hair trying to figure this out, google please help
me.
Thanks!
Viliam Kubis
skaffman
unread,
Sep 11, 2009, 5:30:51 AM9/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
I posted a message a few days ago about this, although in my case it
was the XHTML MobileProfile doctype that caused the problem. From your
message, it seems like the problem is much wider than that, and all
XHTML doctypes break the API.
On Sep 11, 12:26 am, kbs1 <viliam.ku...@gmail.com> wrote:
> Hello, I have never developed for google maps api until now. For 4
> hours now I have been fiddling with the map not displaying at all on a
> website, that I am writing.
>
> See the problem directly:http://new.mediamenu.sk/maps_test.html >
> Now what is the file? It is an example from the official website, ONLY
> customized to use the XHTML doctype. That's right, only two top lines
> are different.
>
> The map does not display at all.
>
> Facts that I have elaborated right now:
> - it does not matter if you use the strict or transitional doctype
> - it does not matter if you serve the page using text/html or
> application/xhtml+xml
> - no combination of meta tags or script elements would solve this
> problem
> - it does not matter if you wrap the map-creating JS code in <![CDATA
> [ and ]]>
>
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
SUCCESS!!!!
With this wonderful script made by Mr. Weston Ruter to emulate
document.write in XHTML (http://shepherd-interactive.googlecode.com/ svn/trunk/xhtml-document-write/xhtml-document-write.js), the map
finally shows up!! I have not updated the test page, but it works. I
thought from the beginning that document.write is the problem.
Maybe in future versions you could try to avoid using document.write,
that would be great! Or at least post some notice on the front page so
that people know how to get the maps working.
Cheers!
pamela (Google Employee)
unread,
Sep 11, 2009, 8:20:59 PM9/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
We do offer a way of loading the Maps API dynamically (via script
append instead of document.write), though I think it may not be in the
documentation.
> We do offer a way of loading the Maps API dynamically (via script
> append instead of document.write), though I think it may not be in the
> documentation.
>
by load event of the appended script. That function is not found and
an error is thrown with FF.
pamela (Google Employee)
unread,
Sep 11, 2009, 8:42:59 PM9/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
Thanks for seeing that, Esa. We used to require developers to call
that function, but we now call it ourselves, internally, so that
developers don't need to.
I have just updated the samples and you can see that it is an easy
technique to use.
- pamela
kbs1
unread,
Sep 12, 2009, 7:54:20 AM9/12/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Maps JavaScript API v3
Hello Pamela, thanks for your fast reply. The method you have
mentioned does actually work perfect. I have updated the test page at
http://new.mediamenu.sk/maps_test.php so that anybody can verify that,
the page is pure XHTML served as application/xhtml+xml. I guess this
is the right way to do it instead of the dirty document.write XHTML
hack.
You should update the documentation so that people know this method
even exist. I have spent hours of researching and searching the web,
but the "callback" parameter when loading the script is not mentioned
anywhere, at least not in api V3 documentation.
Thanks & have a nice day
On 12. Sep., 02:20 h., "pamela (Google Employee)"
<pamela...@gmail.com> wrote:
> We do offer a way of loading the Maps API dynamically (via script
> append instead of document.write), though I think it may not be in the
> documentation.
>