PDA

View Full Version : google.maps.MapTypeId Error with GMapPanel3



europe72
21 Jan 2010, 8:57 AM
Hello,

I am attempting to implement a gmappanel using Ext.ux.GMapPanel3.js. I have copied the example exactly from the example provided with the plugin source, but keep receiving the following error:

TypeError: Result of expression 'google.maps.MapTypeId' [undefined] is not an object.

My API key is good, and I am including v3 of google maps.

any ideas?

I've searched the forum and the web prior to posting here.

Thanks in advance.


border layout...
{
region: 'center',
xtype: 'tabpanel',
deferredRender: false, // set this so we have access to the map on the second tab before its been activated
defaults: {
xtype: 'gmappanel',
zoomLevel: 14,
gmapType: 'map',
mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl']
},
items: [{
xtype: 'panel',
title: 'Tab Without Map',
html: 'The other maps have been rendered but not displayed yet'
},{
title: 'Fenway Park',
id: 'my_map1',
setCenter: {
geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
marker: {title: 'Fenway Park'}
}
},{
title: 'Boston Museum of Fine Arts',
id: 'my_map2',
setCenter: {
geoCodeAddr: '465 Huntington Avenue, Boston, MA, 02215-5597, USA',
marker: {title: 'Boston Museum of Fine Arts'}
}
}]
}
...

europe72
21 Jan 2010, 10:31 AM
Please disregard. The issue was that I was still trying to pass my API key to V3 of google maps API, which is no longer required.

Sasha172
28 Sep 2011, 1:45 AM
Hi,
I'm having the same problem. Can you tell me what you did to solve it?? I've spent all afternoon trying to get rid of the ['undefined'] javascript errors that googlemaps keeps throwing up :(

Thanks in advance
Sasha