[TIMOB-10892] iOS: App gives error for, center and span, being nan (iOS 6)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-14T16:04:04.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
Components | iOS |
Labels | api, module_map, qe-ios090112, qe-ios6, qe-testadded |
Reporter | Shyam Bhadauria |
Assignee | Vishal Duggal |
Created | 2012-09-13T05:24:10.000+0000 |
Updated | 2012-10-26T21:55:33.000+0000 |
Description
This is not a regression. It happens on 2.1.2 also.
App works fine on iOS 5.1
Steps to reproduce:
1. Use the app below
at app.js (line 91)' Snapshot attached.
var _window = Ti.UI.createWindow();
_window.backgroundColor = 'white';
//create object instance, a parasitic subclass of Observable
var self = Ti.UI.createView();
_window.add(self);
var mapObject = Titanium.Map.createView({
mapType : Titanium.Map.STANDARD_TYPE,
animate : true,
regionFit : true,
userLocation : true,
top : '150',
height : '400dp',
zoomEnabled : true,
region : {
latitude : 37.77501,
longitude : -122.419,
latitudeDelta : 0.01,
longitudeDelta : 0.01
},
});
mapObject.addEventListener('click', function() {
alert('map clicked');
});
var selectAnnotations = Ti.UI.createButton({
title : "Select Annotations",
top : '0',
});
var annotations = []
annotations[0] = Titanium.Map.createAnnotation({
animate : true,
title : 'Citibank',
subtitle : '#1',
id : '1',
pincolor : Titanium.Map.ANNOTATION_RED,
latitude : parseFloat(37.776),
longitude : parseFloat(-122.419),
image : '/images/locPin.png'
});
annotations[1] = Titanium.Map.createAnnotation({
animate : true,
title : 'Citibank',
subtitle : '#2',
id : '2',
pincolor : Titanium.Map.ANNOTATION_RED,
latitude : parseFloat(37.77501),
longitude : parseFloat(-122.419),
image : '/images/locPin.png'
});
annotations[2] = Titanium.Map.createAnnotation({
animate : true,
title : 'Citibank',
subtitle : '#3',
id : '3',
pincolor : Titanium.Map.ANNOTATION_RED,
latitude : parseFloat(37.770),
longitude : parseFloat(-122.419),
image : '/images/locPin.png'
});
annotations[3] = Titanium.Map.createAnnotation({
animate : true,
title : 'Citibank',
subtitle : '#4',
id : '4',
pincolor : Titanium.Map.ANNOTATION_RED,
latitude : parseFloat(37.770),
longitude : parseFloat(-122.43),
image : '/images/locPin.png'
});
mapObject.addAnnotation(annotations[0]);
mapObject.addAnnotation(annotations[1]);
mapObject.addAnnotation(annotations[2]);
mapObject.addAnnotation(annotations[3]);
self.add(mapObject);
self.add(selectAnnotations);
var thisObj = this;
selectAnnotations.addEventListener('click', function(e) {
mapObject.selectAnnotation(annotations[2], true);
});
_window.open();
2. Run the app on iOS 6
Expected result
2. App should run successfully.
Actual result
2. It gives a error 'Invalid Region Attachments
File | Date | Size |
---|---|---|
Map2012.09.13 17.50.51.png | 2012-09-13T05:24:10.000+0000 | 123583 |
Can not reproduce this with either master or latest 2.1.3 on IOS6 device or simulator. Tested with both Xcode 4.3.1 and Xcode 4.5 GM. Both devices running IOS6 GM Seed
https://github.com/appcelerator/titanium_mobile/pull/2954 pull pending.
Pull merged
Environment used for verification - Titanium SDK: 2.1.3.v20120915120319 Titanium Studio:2.1.2.201208301612 Device : iPad iOS 6.0 Xcode : 4.5 Machine OS : MAC 10.8