{ "id": "64190", "key": "TIMOB-3558", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-16T16:47:10.000+0000", "created": "2011-04-15T03:46:39.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "parity", "qe-port", "training" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-28T02:25:57.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": "h1. Problem\r\nYou can't pass an array of dictionaries {} to the annotations\r\nproperty on a map view. But you CAN pass in an array of explicitly\r\ncreated annotations Ti.Map.createAnnotation({ }). This use case\r\nalready works on iOS.\r\n\r\nThis contrasts with the \"annotation\" property, where you can\r\neither pass in a Ti.Map.createAnnotation({ }), or simply a\r\ndictionary {}.\r\n\r\nh2. Sample Code\r\nThe following will crash at runtime (as soon as you open the\r\napp) if placed in an app.js:\r\n\r\n{code:title=app.js}var win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\n\r\nwin.add(Ti.Map.createView({\r\n mapType: Ti.Map.STANDARD_TYPE,\r\n regionFit: true,\r\n region: { latitude: 50.8683, longitude: 6.0818, latitudeDelta: 0.01, longitudeDelta: 0.01 },\r\n annotations: [\r\n {\r\n latitude: 50.8683, longitude: 6.0818, title: 'Rolduc Abbey'\r\n }\r\n ]\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n\r\nBUT if we wrap the dictionary passed in to the annotation with\r\nan explicit call to Ti.Map.createAnnotation it won't crash anymore.\r\nHere is the code with only that one line updated:\r\n\r\n{code:title=app2.js}var win = Ti.UI.createWindow({ backgroundColor: '#fff' });\r\n\r\nwin.add(Ti.Map.createView({\r\n mapType: Ti.Map.STANDARD_TYPE,\r\n regionFit: true,\r\n region: { latitude: 50.8683, longitude: 6.0818, latitudeDelta: 0.01, longitudeDelta: 0.01 },\r\n annotations: [\r\n Ti.Map.createAnnotation({ // <-- this is the first line that changed\r\n latitude: 50.8683, longitude: 6.0818, title: 'Rolduc Abbey'\r\n }) // <-- this is the other line that changed\r\n ]\r\n}));\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Tested On\r\nTitanium SDK version: 1.7.0 (04/05/11 10:30 731db9c...)\r\nBROKEN on Samsung Epic 4G Android 2.2\r\nWORKS on iPhone Simulator 4.2\r\n\r\nh2. Associated Helpdesk Ticket\r\nhttp://support-admin.appcelerator.com/display/RSN-92979-828", "attachment": [], "flagged": false, "summary": "Android: Map Annotations Array Doesn't Accept Dictionary", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "130754", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

fixing tags.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:46:40.000+0000", "updated": "2011-04-15T03:46:40.000+0000" }, { "id": "216395", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "App is not crashing now.\r\nEnvironment used for verification -\r\nTested with Titanium SDK: 2.2.0.v20120827143312 , 2.1.1.GA,2.1.0.v20120628121617\r\nTested with Titanium  Studio: 2.1.2.201208201549\r\nDevice - Android 2.2,2.3 emulator\r\nMachine OS - MAC 10.7.3", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-28T02:25:57.000+0000", "updated": "2012-08-28T02:25:57.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }