[TIMOB-12152] iOS6: TiMaps scrolling is slow on iPhone 4
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2013-01-29T05:16:35.000+0000 |
Affected Version/s | Release 2.1.4, Release 3.0.0 |
Fix Version/s | 2013 Sprint 02 Core, 2013 Sprint 02 |
Components | iOS |
Labels | SupportTeam, core, maps, qe-port |
Reporter | Nikhil Sharma |
Assignee | Max Stepanov |
Created | 2012-12-26T02:38:08.000+0000 |
Updated | 2014-06-19T12:44:27.000+0000 |
Description
TiMap scrolling on iPhone4 is slower and sluggish as compared to native iOS maps scrolling.
Steps to reproduce
1. Run the below sample code in your project's app.js or KitchenSink's map example. 2. Open the application. 3. Scroll through the map and you can see the slowness in the scroll performance as compared to the native iOS maps.
var win = Ti.UI.createWindow();
var mountainView = Titanium.Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:Titanium.Map.ANNOTATION_RED,
animate:true,
leftButton: '../images/appcelerator_small.png',
myid:1 // Custom property to uniquely identify this annotation.
});
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region: {latitude:33.74511, longitude:-84.38993,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});
win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);
// Check for all of the possible names that clicksouce
// can report for the left button/view.
if (evt.clicksource == 'leftButton' || evt.clicksource == 'leftPane' ||
evt.clicksource == 'leftView') {
Ti.API.info("Annotation " + evt.title + ", left button clicked.");
}
});
win.open();
I would also add that on top of that performance issue, it gets even worse if you use the regionChanged event listener (even if it does nothing).
I can confirm this issue. It's significantly worse with iOS6 and the new Apple Maps. I tested the same code on an iOS5.1 device with Google Maps and the performance was significantly better.
PR https://github.com/appcelerator/titanium_mobile/pull/3791
*It is slow scrolling in iPhone4 with iOS6.0.1* There is a difference in masshtab between native map and test app map as well. I do not see a significant difference in behavior though. Tested with: Titanium Studio, build: 3.0.1.201212181159 Titanium SDK, build: 3.0.2.v20130128144016 Titanium SDK, build: 3.1.0.v20130128105819 iPhone4 5.1.1 iPhone4S 5.0.1 iPhone5 6.0 iPhone4 6.0 ---slow
Moving out of 3.0.2 for now--move back in if we have a fix.
I tested with 100% native app that uses MapView and it had the same slow scrolling on iPhone4 running iOS6. Apple's Maps app shows smoother scrolling.