Problem
Test scenario:
1. add an annotation with image on the map
2. remove all annotations
3. add a new annotation with different image
Expected:
* Different annotations should show different images
Actual:
* Only the image of the first annotation is shown each time an annotation is added
Offending commit in TiMobile is:
https://github.com/appcelerator/titanium_mobile/commit/cec61736bb171c6dd05463cf8d8b593dded07fa8
Test case
var win = Titanium.UI.createWindow({backgroundColor: 'white'});
var createAnnotationWithImage = function(image) {
return Ti.Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
image: image
});
};
var mapview = Titanium.Map.createView({
region: {latitude:37.337681,longitude:-122.038193,animate:true,latitudeDelta:0.04, longitudeDelta:0.04}
});
function update_annotations() {
mapview.removeAllAnnotations();
mapview.annotations = [createAnnotationWithImage('image_1.png')];
}
mapview.annotations = [createAnnotationWithImage('image_0.png')];
setTimeout(update_annotations, 4000);
win.add(mapview);
win.open();
Olivier -- Do you have a workaround for this one in the mean time? We're crushed by this one bug at the moment .... Thanks
A possible *temporary* workaround is to revert the commit I mentioned in the ticket in your Ti SDK. In other words you open the
iphone/Classes/TiMapView.m
file under your 1.8.2 sdk and replace line 649:with:
ok my code formatting didn't work, sorry
There is edit option here (on a contrary to QA :) ) and code syntax: { code }mycode{ code }. Just remove spaces from "code" tags. :)
Thx Ivan, I hate Jira ;-)
I can confirm this is a bug.
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.