Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11359] iOS: Map - Device rotation returns default map view.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-11-16T21:32:30.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.1, Release 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23
ComponentsiOS
Labelsapi, ios, module_map, qe-ios100112, qe-testadded
ReporterOlga Romero
AssigneeVishal Duggal
Created2012-10-10T21:01:58.000+0000
Updated2014-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)

Comments

  1. Vishal Duggal 2012-11-06

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3381
  2. Vishal Duggal 2012-12-27

    Backport PR to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3640
  3. Shyam Bhadauria 2013-01-03

    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

JSON Source