I have a google map defined in Sencha touch 2. It's showing the map, but it's not responding on touch events. I can't move or pinch it.
Ext.define('AddressBook.view.contact.Show', {
extend: 'Ext.Panel',
xtype: 'contact-show',
requires: [
'Ext.Map'
],
config: {
title: 'Information',
layout: 'card',
items: [
{
xtype: 'map',
mapOptions : {
zoom : 15,
mapTypeId : google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.DEFAULT
}
}
}
]
},
centerMap: function(newRecord) {
...
},
setMarkers: function(markers) {
...
}
});
I created it in app.js:
Ext.Loader.setConfig({ enabled: true });
Ext.application({
...
launch: function() {
Ext.Viewport.add({
xclass: 'AddressBook.view.contact.Show'
});
}
});
I include the google script:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"</script>
The thing is that the "Map" example that Sencha is providing seems to work fine. But it's using Ext.setup() and Ext.create() to show the map in app.js. I can't figger out why it's working fine that way. But also I can't use that way of creating the map. Anyone knows what's the problem?