Gmail Calendar Documents Web Reader more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Object cannot be created in this context II
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
litlfred  
View profile  
(1 user)  More options Nov 12 2006, 12:11 am
From: "litlfred" <litlf...@gmail.com>
Date: Sat, 11 Nov 2006 15:11:17 -0800
Local: Sun, Nov 12 2006 12:11 am
Subject: Object cannot be created in this context II
This is a reopening of  the thread:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/c...
which  was closed to inactivity.

At least in firefox, one cannot use the Google maps API in a page that
serves up application/xhtml+xml.  Trying to do so gives the error...

    Error: uncaught exception: [Exception... "Object cannot be created
in this context"  code: "9"  nsresult: "0x80530009
(NS_ERROR_DOM_NOT_SUPPORTED_ERR)"  location:
"http://maps.google.com/maps?file=api&v=2.67&key=ABQIAAAAvJj3EmTd-fzYK...
Line: 1"]

If the page is served up as text/html it works fine.

Unfortunately I have mathML and I must serve up the document as
application/xhtml+xml.

Here are two examples, one works, the other doesn't.  The only
difference is the header:
    xhtml/xml  :
http://www.ibiblio.org/litlfred/mapit/GeoTraffic_Show_xhtml_xml.php
    text/html   :
http://www.ibiblio.org/litlfred/mapit/GeoTraffic_Show_text_html.php

(click on the globe)

Has anyone found a workaround since the topic was closed?
Thanks,
-frederick


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
d_henderson  
View profile  
(1 user)  More options Nov 12 2006, 2:40 am
From: "d_henderson" <djndn...@gmail.com>
Date: Sun, 12 Nov 2006 01:40:41 -0000
Local: Sun, Nov 12 2006 2:40 am
Subject: Re: Object cannot be created in this context II
I performed a detailed analysis of the problem. For starters, the
document object created in Firefox when the mime type is
application/xhtml+xml does not have the write() method. I wrote my own,
but even with that in place, a simple map would render, pan and zoom,
change map type, but the terms of use was not updated properly, and the
marker did not respond to clicks.

This indicated that some basic document features, in addition to the
write() method, were not implemented or working properly. In
particular, the event model did not seem to be working the way the Maps
API expects.

I concluded that this was a problem I could not resolve by creative
coding in the user page, but one that required correction by the Google
Maps API development team.

There is a solution that may work for you. It requires that you embed a
second html document within your main page. This can easily be done
with the html iframe element, as illustrated here:

http://www3.telus.net/DougHenderson/Map_in_iframe_v2.html

An alternate implementation uses html and xhtml object elements as
shown here:

http://www3.telus.net/DougHenderson/Map_in_object_v2.html

I also have an example that uses mime type of application/xhtml+xml
here:

http://www3.telus.net/DougHenderson/Map_in_object_v2.xhtml

This one does not work properly, as I have not been able to pass
commands from the parent window to the embedded object. You will see an
error on the javascript console when you press the "Click here to
change location" button. If you don't need this feature, object element
should let you embed a page with mime type text/html inside your page.

The key to using this method, is to create a page containing a map that
completely fills a page, and which adjusts to the available space.
Then, the embedded map will snuggle into the space provided by the
iframe or object element without overflow or gaps.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google