{ "id": "100346", "key": "TIMOB-10739", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14127", "description": "Sprint 2012-19 API", "name": "Sprint 2012-19 API", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-21T16:36:57.000+0000", "created": "2012-09-03T07:16:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-09-21T17:27:29.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem description\r\nChanging an annotation position (setLatitude/setLongitude) does not reflect in the map, unless the map is resized. However, the first time the position is changed, it works.\r\n\r\nh2. Steps to reproduce\r\nUse the following code to test the behavior. The app changes the position of the annotation every 5 seconds, but only the first time it works. Try to resize the view, and see the annotation position is updated.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n});\r\nvar POI1 = [53.5439796, 9.9524117], CENTER = [53.5459431, 9.9598360], POI2 = [53.5450506, 9.9674320];\r\nvar map = Ti.Map.createView({\r\n mapType : Titanium.Map.HYBRID_TYPE,\r\n region : {\r\n latitude : CENTER[0],\r\n longitude : CENTER[1],\r\n latitudeDelta : 0.03,\r\n longitudeDelta : 0.03\r\n }\r\n});\r\nvar poi = Ti.Map.createAnnotation({\r\n latitude : POI1[0],\r\n longitude : POI1[1],\r\n title : 'FISCHMARKT',\r\n});\r\nmap.addAnnotation(poi);\r\nmap.selectAnnotation(poi);\r\nwin.add(map);\r\nwin.open();\r\nsetInterval(function() {\r\n if (poi.title == 'FISCHMARKT') {\r\n poi.setLatitude(POI2[0]);\r\n poi.setLongitude(POI2[1]);\r\n poi.title = 'LANDUNGSBRÜCKEN';\r\n Ti.API.log('POI moved to Landungsbrücken');\r\n } else {\r\n poi.setLatitude(POI1[0]);\r\n poi.setLongitude(POI1[1]);\r\n poi.title = 'FISCHMARKT';\r\n Ti.API.log('POI moved to Fischmarkt');\r\n }\r\n}, 5000);\r\n{code}\r\n\r\nh2. Additional note\r\nAdding these 2 lines to simulate the zoom in/out works, although it is an ugly workaround:\r\n\r\n{code}\r\nmap.zoom(0.1);\r\nmap.zoom(-0.1);\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: change annotation position works only once, unless the map zoom changes", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 2.1.2\r\niOS", "comment": { "comments": [ { "id": "218211", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2900", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-10T12:33:16.000+0000", "updated": "2012-09-10T12:33:16.000+0000" }, { "id": "219692", "author": { "name": "ryanpopa", "key": "ryanpopa", "displayName": "Ryan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried updating my SDK but it seems it still doesn't work. How can I use this fix as soon as possible? Thank you, hope somebody can answer...", "updateAuthor": { "name": "ryanpopa", "key": "ryanpopa", "displayName": "Ryan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-19T06:59:27.000+0000", "updated": "2012-09-19T06:59:27.000+0000" }, { "id": "219694", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "@Ryan: which version of the SDK did you try?", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-19T07:20:32.000+0000", "updated": "2012-09-19T07:20:32.000+0000" }, { "id": "220235", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopened by mistake. resolving", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-09-21T16:36:57.000+0000", "updated": "2012-09-21T16:36:57.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }