{ "id": "119908", "key": "TIMOB-15161", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" } ], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2013-09-16T17:18:33.000+0000", "created": "2013-09-13T12:14:52.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "supportTeam" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T00:54:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. Description\r\nIf I attempt to set the image of a annotation after it has been added to the map view and that map view has been rendered on screen, you can not change the image of the annotation again.\r\nAlthough, I have found that if you set the image of an annotation after it has been added to the map view but before that map view has been rendered on screen, then you can change the image of the annotation again.\r\n\r\nh2. Test Case\r\nalloy.js\r\n{code}\r\nAlloy.Globals.Map = require('ti.map');\r\n{code}\r\nindex.xml\r\n{code}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\nindex.js\r\n{code}\r\n// If the window is opened here then images are not set properly\r\n$.index.open();\r\n\r\n// API calls to the map module need to use the Alloy.Globals.Map reference\r\nvar mountainView = Alloy.Globals.Map.createAnnotation({\r\n latitude:37.390749,\r\n longitude:-122.081651,\r\n title:\"Appcelerator Headquarters\"\r\n});\r\n\r\nmountainView.setImage('/images/eventMarker.png');\r\n\r\nvar mountainView2 = Alloy.Globals.Map.createAnnotation({\r\n latitude:37.391749,\r\n longitude:-122.081651,\r\n title:\"Appcelerator Headquarters 2\"\r\n});\r\n\r\nmountainView2.setImage('/images/eventMarker.png');\r\n\r\n$.mapview.region = {latitude:37.390749, longitude:-122.081651,\r\n latitudeDelta:0.01, longitudeDelta:0.01};\r\n$.mapview.addAnnotations([mountainView, mountainView2]);\r\n\r\nvar annotations = $.mapview.getAnnotations();\r\n\r\n//Attempt to set the annotation image to something else\r\nfor (var i = 0; i < annotations.length; i++) {\r\n annotations[i].setImage('/images/eventMarkerS.png');\r\n alert('Image set to: ' + annotations[i].getImage());\r\n}\r\n\r\n// If the window is opened here then images are set properly\r\n// $.index.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Unable to change the annotation image once the map view is rendered", "creator": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rsharma", "key": "rsharma", "displayName": "Rupesh Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android : 4.1.2", "comment": { "comments": [ { "id": "271303", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a creation only property, a native Android limitation: https://developers.google.com/maps/documentation/android/marker#add_a_marker (look at 'icon'). Also, this is documented in http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.Annotation-property-image. Closing ticket.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T17:18:07.000+0000", "updated": "2013-09-16T17:18:07.000+0000" }, { "id": "416103", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue here is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T00:54:30.000+0000", "updated": "2017-03-29T00:54:30.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }