[TIMOB-10405] Android: Mapview setLocation Parity Issue
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-08-23T10:58:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | api |
Reporter | Frank Apap |
Assignee | Nikhil Sharma |
Created | 2012-05-17T05:52:28.000+0000 |
Updated | 2017-03-21T22:32:08.000+0000 |
Description
On android, when the mapview has regionFit set to false using setLocation and changing the zoom (delta) doesn't actually change the delta. It seems to work on iPhone and on Android if regionFit is true. The different behavior in Android/iPhone makes me think this is not desired behavior. Sample code below:
Titanium.UI.setBackgroundColor('#000');
navWindow = Ti.UI.createWindow();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var regionSV = {latitude:33.74511, longitude:-84.38993,animate:true,latitudeDelta:0.02, longitudeDelta:0.02,animate:true};
//
// CREATE MAP VIEW
//
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5},
animate:false,
regionFit:false, //this set to false prevents zooming on Android only
userLocation:false
});
win1.add(mapview);
win1.open();
setTimeout(function(){
mapview.setLocation(regionSV);
},5000);
What Ti SDK you're reporting it for?
Cannot reproduce this issue with the latest master CI build
Closing ticket as the issue cannot be reproduced and due to the above comments.