How to mark on the map accoding to the latitude and longitude?
I have got a problem with the code below. Please help me find it out. I have already add the google api in my work.
Ext.define('MAP.view.Main', {
extend: 'Ext.Panel',
width: 320,
height: 480,
config: {
layout: {
type: 'fit'
},
items: [
{
xtype: 'toolbar',
docked: 'top'
},
{
xtype: 'map',
mapOptions : {
center : new google.maps.LatLng(31.196199417114258, 121.430999755859),
zoom: 15
},
listeners: {
maprender: function(comp, map) {
var marker = new google.maps.Marker({
var position=new google.maps.LatLng(31.196199417114258, 121.430999755859),
position: position,
title : 'Sencha HQ',
map: map
});
marker.setMap(map);
}
}
}
]
}
});
Change the position of listener.
Change the position of listener.