PDA

View Full Version : Ext.gmappanel



kristianna
22 Aug 2012, 12:57 AM
Hello,

I'm having some trouble when I'm trying to get Google maps working. I've been searching all over Google for a while, but I still can't find out what's wrong.

Error:

Uncaught ReferenceError: google is not defined



Ext.require([
'Ext.ux.GMapPanel'
]);

items: {
xtype: 'gmappanel',
zoomLevel: 14,
gmapType: 'map',
mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
setCenter: {
geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
marker: {title: 'Fenway Park'}
},
markers: [{
lat: 42.339641,
lng: -71.094224,
marker: {title: 'Boston Museum of Fine Arts'},
listeners: {
click: function(e){
Ext.Msg.alert({title: 'Its fine', text: 'and its art.'});
}
}
},{
lat: 42.339419,
lng: -71.09077,
marker: {title: 'Northeastern University'}
}]
}

kristianna
22 Aug 2012, 2:50 AM
Is there a problem that I'm using HTTPS?

scottmartin
22 Aug 2012, 8:54 AM
Are you sure the UX is loaded? Any errors in the console?

Does our example work for you? perhaps you can detect the problem after reviewing our example code.

Scott.

kristianna
22 Aug 2012, 11:05 PM
Hello Scottmartin,

I tried to directly copy the example, and still it wouldnt work. I think it's because the server is running HTTPS. I switched to OpenStreetMap because of Google maps license after 2500 requests pr day.