I migrated this app from JQuery Mobile, and I used the Google API to make a Google map. I am aware Sencha has a map object, but I have already coded everything into the current map I have, and am not sure how to do so in the map element.
Moving on, when I touch the current map and move stuff around, it scrolls the whole page. How can I prevent the whole screen from scrolling vertically when I click on a particular DIV? Is it possible?
EDIT: I have a form on this page as well, so I need the screen to scroll. I just want to stop the scroll event when I click anywhere in the DIV that contains my map.
Code:
var locationPanel = Ext.create("Ext.form.Panel", {
title: 'Location',
iconCls: 'info',
xtype: 'formpanel',
layout: 'vbox',
items: [
{
xtype: 'fieldset',
title: 'Geolocation',
items: [
{
xtype: 'textfield',
label: 'Address',
id: 'address',
listeners: {
blur: function(){codeAddress('latitude', 'longitude', true)}
}
},
{
xtype: 'textfield',
label: 'Latitude',
id: 'latitude',
readOnly: true
},
{
xtype: 'textfield',
label: 'Longitude',
id: 'longitude',
readOnly: true
}
]
},
{
html: [
'<br/><center><div id="map_canvas" style="border:1px solid black;width: 90%; height: 200px"></div></center><br/>'
]
}
],
listeners: {
activate: function() {
if(firstLoad)
{
getCoords();
firstLoad = false;
}
}
}
});