[TIMOB-11359] iOS: Map - Device rotation returns default map view.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-11-16T21:32:30.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23 |
Components | iOS |
Labels | api, ios, module_map, qe-ios100112, qe-testadded |
Reporter | Olga Romero |
Assignee | Vishal Duggal |
Created | 2012-10-10T21:01:58.000+0000 |
Updated | 2014-06-19T12:43:50.000+0000 |
Description
Description:
While testing module Map I noticed, that a default map view has been returned after a map location had been changed and the device rotated.
NOT a regression, occurs on 2.1.3
Test steps:
1. Run this code:
var win = Ti.UI.createWindow();
//
// CREATE ANNOTATIONS
//
var atlantaParams = {
latitude:33.74511,
longitude:-84.38993,
title:"Atlanta, GA",
subtitle:'Atlanta Braves Stadium\nfoo',
animate:true,
rightButton: Titanium.UI.iPhone.SystemButton.DISCLOSURE,
myid:3
};
atlantaParams.pincolor = Titanium.Map.ANNOTATION_PURPLE;
var atlanta = Titanium.Map.createAnnotation(atlantaParams);
//
// 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:true,
regionFit:true,
userLocation:true
});
mapview.addAnnotation(atlanta);
win.add(mapview);
var bt = Ti.UI.createButton({
title: "Select Annotation",
width: 130,
height: 40,
left: 0,
top: 0
});
bt.addEventListener("click",function(e){
mapview.region = {latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5};
mapview.selectAnnotation(atlanta);
});
win.add(bt);
win.open();
2. Move the map to a different location.
3. Rotate the device.
Expected result:
The map should display that different location.
Actual result:
The map returns a default map view (Atlanta, GA)
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3381
Backport PR to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3640
The map displays expected location on rotating device. Verified with following Titanium SDK: 3.1.0.v20130102102603 Titanium SDK:3.0.1.v20121228113204 Titanium Studio:3.0.1.201212181159 Device: iPad3 iOS 5.1 iPad4 iOs 6.0