Opera throws exception

369 views
Skip to first unread message

chris

unread,
Oct 19, 2010, 5:54:49 PM10/19/10
to Google Maps JavaScript API v3
Running Opera 10.63 I get this error:

"Uncaught exception: TypeError: 'google.maps.Geocoder' is not a
constructor"

It works fine on Firefox, Safari, IE, and Chrome. If I save the page
to my desktop and run it from there, Opera will load the API without
error.

So why would running the page from my localhost not work on Opera?
I'm pulling my hair out. :-)

<script src="http://maps.google.com/maps/api/js?sensor=true"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function initialize() {
geocoder = new google.maps.Geocoder();

var latlng = new google.maps.LatLng(0, 0);
var myOptions = {
zoom: 1,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

}
//]]>
</script>

Chris Broadfoot

unread,
Oct 19, 2010, 7:32:56 PM10/19/10
to google-map...@googlegroups.com
Could you please post a link to your page. An incomplete excerpt from your page isn't enough to diagnose the problem.


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


chris

unread,
Oct 28, 2010, 5:49:34 PM10/28/10
to Google Maps JavaScript API v3
I've got a temporary page at http://dri.drillar.com/home/map

On Oct 19, 6:32 pm, Chris Broadfoot <c...@google.com> wrote:
> Could you please post a link to your page. An incomplete excerpt from your
> page isn't enough to diagnose the problem.
>
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2Bunsu...@googlegroups.com>
> > .

Chad Killingsworth

unread,
Oct 28, 2010, 5:59:00 PM10/28/10
to Google Maps JavaScript API v3
I'd just like to point out that Opera is not one of the supported
browsers for the maps v3 API: http://code.google.com/apis/maps/faq.html#browsersupport

Chad Killingsworth

On Oct 28, 4:49 pm, chris <cwmartini...@gmail.com> wrote:
> I've got a temporary page athttp://dri.drillar.com/home/map
> > > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>

olak

unread,
Nov 22, 2010, 9:19:36 AM11/22/10
to Google Maps JavaScript API v3

On Oct 28, 10:49 pm, chris <cwmartini...@gmail.com> wrote:
> I've got a temporary page athttp://dri.drillar.com/home/map

This page sends Opera application/xhtml+xml, while other browsers get
text/html. Since the page uses document.write it all falls apart in
Opera.
> > > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B­unsub...@googlegroups.com>

Chris Broadfoot

unread,
Nov 22, 2010, 7:53:11 PM11/22/10
to google-map...@googlegroups.com
You can load with a DOM-compliant method by specifying the 'callback' parameter. For example:

To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages