Problem Description
When updating the region of the map in MobileWeb (setRegion or setLocation), the zoom does not change accordingly to the delta, if animate is set to true.
Steps to reproduce
USe the following code to reproduce the problem: clicking on the buttons the region changes, but the zoom doesn't.
var defaultLat = 49.809597;
var defaultLng = -97.132756;
var win = Titanium.UI.createWindow({
backgroundColor : 'black'
});
var mapView = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
animate:true,
animated:true,
regionFit:true,
userLocation:true,
region : {'latitude':defaultLat,'longitude':defaultLng,animate:true,'latitudeDelta':0.01,'longitudeDelta':0.01}
});
win.add(mapView);
var buttonView = Ti.UI.createView({
layout : 'horizontal',
width : Ti.UI.SIZE,
top: 0
})
var button = Ti.UI.createButton({
title:'setLocation'
});
button.addEventListener('click', function() {
mapView.setLocation({'latitude':defaultLat,'longitude':defaultLng,animate:true,'latitudeDelta':0.1,'longitudeDelta':0.1});
});
buttonView.add(button);
var button2 = Ti.UI.createButton({
title:'setRegion'
});
button2.addEventListener('click', function() {
mapView.setRegion({'latitude':defaultLat,'longitude':defaultLng,animate:true,'latitudeDelta':0.1,'longitudeDelta':0.1});
});
buttonView.add(button2);
win.add(buttonView);
win.open();
This issue can't be reproduced with TISDK 3.2 or higher. Therefore, marking it as resolved.
Verified the fix, hence closing the issue. Environment used: SDK: 3.2.3.v20140311115447 CLI version : 3.2.1 OS : MAC OSX 10.9 Alloy: 1.3.1 ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.2.2.201403061827 titanium-code-processor: 1.1.0 XCode : 5.1