[TIMOB-7908] iOS: User Location blue dot disappears often disappears on the device when using annotations
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-05-03T10:47:56.000+0000 |
Affected Version/s | Release 1.8.2 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | iOS |
Labels | module_map, qe-testadded |
Reporter | Varun Joshi |
Assignee | Max Stepanov |
Created | 2012-03-06T17:12:59.000+0000 |
Updated | 2012-05-03T10:47:56.000+0000 |
Description
The blue dot that is used to indicate the user's current location disappears randomly when adding and removing annotations.
Run the attached sample app.js to reproduce the issue: (test only on the device)
1. Initially, the user location and annotation is shown on the map.
2. Now, click on the "remove" button to remove the annotation. Then click on "add" button to add a different annotation.
3. The blue dot now disappears from the map.
Here is the file:
var win = Ti.UI.createWindow({
backgroundColor:'white',
fullscreen: false
});
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/download.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);
var bottomview = Ti.UI.createView({
bottom: 0,
height : 50,
width : '100%',
backgroundColor: 'gray'
});
win.add(bottomview);
var removebutton = Ti.UI.createButton({
top:10,
left: 20,
width: 100,
title: 'Remove'
});
bottomview.add(removebutton);
var addbutton = Ti.UI.createButton({
top:10,
right: 20,
width: 100,
title: 'Add'
});
bottomview.add(addbutton);
removebutton.addEventListener('click', function(){
mapview.removeAllAnnotations();
});
var addAnno = Titanium.Map.createAnnotation({
latitude:37.490749,
longitude:-122.081651,
title:"Added Annotation",
//subtitle:'add subtitle',
pincolor: Titanium.Map.ANNOTATION_GREEN,
animate:false,
draggable:true
});
addbutton.addEventListener('click', function(){
mapview.addAnnotation (addAnno);
});
win.open();
This works on the simulator but not on iPad or iPhone device.
Merged pull #1663
Closing as Fixed. SDK: 2.0.0.v20120316130302 Studio: 2.0.0.201203152033 OS: Snow Leopard Devices Tested: iPad2 4.3.5, iPhone4 5.0.1 Note: The simulator does not have a blue dot at all.
Reopening to add/remove labels