I tried the below code to create google map but didn't work. I am working on ExtJS 5.2.
Here is my code:
{
xtype: 'mapPanel',
title: 'Google Map',
align: 'middle',
padding: 10,
pack: 'center',
items: [{
xtype: 'map',
height: 300,
width: 500,
mapConfOpts: ['enableScrollWheelZoom', 'enableDoubleClickZoom', 'enableDragging'],
mapControls: ['GSmallMapControl', 'GMapTypeControl', 'NonExistantControl'],
center: {
geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
marker: {
title: 'Fenway Park'
}
},
markers: [{
lat: 42.339641,
lng: -71.094224,
title: 'Boston Museum of Fine Arts',
listeners: {
click: function (e) {
Ext.Msg.alert('It\'s fine', 'and it\'s art.');
}
}
}, {
lat: 42.339419,
lng: -71.09077,
title: 'Northeastern University'
}]
}]
}
Any help will be appreciated. Thanks in advance.