Problem Description
touchEnable property of mapView doesn’t work. When Setting touchEnabled:false still allows touch events, zooming, pinching etc... on Android.
Testing Environment:
Titanium SDK: 3.2.3.GA, 3.3.0.GA
Titanium CLI: 3.3.0
Android SDK: 4.2.2,4.4.2,
OS X Version: 10.9.3,
Appcelerator Studio: 3.3.0
Steps to Reproduce:
1. Create a Classic project.
2. Paste this code in app.js file.
3. Add map module in tiapp.xml file.
4. Configure your tiapp.xml file with Google API key.
5. Run this code with the testing environment.
Test Case
var window = Ti.UI.createWindow({
backgroundColor : 'red',
});
var MapModule = require('ti.map');
var mapview = MapModule.createView({
mapType : MapModule.NORMAL_TYPE,
animate : true,
regionFit : true,
width : "100%",
height : "100%",
touchEnabled : false,
region : {
latitude : 37.389569,
longitude : -122.050212,
latitudeDelta : 0.2,
longitudeDelta : 0.2
},
});
window.add(mapview);
mapview.addEventListener('regionchanged', function(e) {
Ti.API.info(e.type);
Ti.API.info(e.latitude + "," + e.longitude);
});
window.open();
Thanks for your report! The Platform team will set the priority on this bug.
This is an annoying bug. Makes it impossible to use maps in scrollviews. Has anybody found a workaround? It seems zIndex is also not working on mapViews, so you can't just add an untouchable layer to the map.
Not solved yet?
Any update on this? I can still replicate the bug with sdk 4.0.0.GA. A possible workaround is to put the map view inside a layout similar to the following:
Ciao, Matteo