[AC-5660] Android: Annotation.image can't be changed if annotation added to mapView.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2018-04-11T21:27:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules |
Labels | android, annotation, ti.map |
Reporter | CREATIVE KAIZEN |
Assignee | Shak Hossain |
Created | 2018-03-14T17:54:42.000+0000 |
Updated | 2018-04-11T21:27:35.000+0000 |
Description
If annotation is on the map then changing image attribute will not change image itself.
Similar problem to TIMOB-20620 with color attribute, which was fixed in one of the Sprints.
var window = Ti.UI.createWindow({
backgroundColor : 'white'
});
window.open();
var mapModule = require('ti.map');
var map = mapModule.createView({
bottom : 50
});
window.add(map);
var annotation = mapModule.createAnnotation({
latitude : 1,
longitude : 1,
image: '/images/baloon_green.png'
});
map.addAnnotation(annotation);
var view = Ti.UI.createView({
backgroundColor: 'red',
bottom: 0,
height: 50
});
window.add(view);
view.addEventListener('click', function() {
view.backgroundColor = 'green';
annotation.image = '/images/baloon_red.png'; //Change annotation image here
annotation.setImage('/images/baloon_red.png'); //Change annotation image here
});
Attachments
File | Date | Size |
---|---|---|
1.png | 2018-03-14T17:53:27.000+0000 | 308548 |
2.png | 2018-03-14T17:53:27.000+0000 | 307230 |
You probably just need to change [this line](https://github.com/appcelerator-modules/ti.map/blob/master/android/src/ti/map/AnnotationProxy.java#L401) to
and likely do the same for other properties that should be changeable, like
customView
.@Hans: I guess so. But I believe that as in TIMOB-20620 with pincolor property it should be fixed with image property as well. Why would we have setImage method if it doesn't work?
It is a computer setter.
Hello [~CREATIVE KAIZEN], Whats the status of your issue? Are you steen having the issue? did you follow Hans's guide?