{ "id": "108082", "key": "TIMOB-12333", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2017-03-29T16:28:00.000+0000", "created": "2013-01-18T06:15:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T16:28:04.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": "h1. Problem description\r\nWith iOS, custom annotation on Ti.Map are not working. Same code is fine in Android.\r\n\r\nh1. Steps to reproduce\r\nUse the following code to see the issue:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar myAnnotations = [];\r\n\r\nvar mapview = Titanium.Map.createView({\r\n mapType: Titanium.Map.STANDARD_TYPE,\r\n region: {latitude:45,longitude:11,latitudeDelta:0.010, longitudeDelta:0.018}\r\n});\r\nwin1.add(mapview);\r\n\r\nvar customView = Ti.UI.createView({\r\n\tlayout:'vertical',\r\n\theight:Ti.UI.SIZE,\r\n\twidth:Ti.UI.SIZE\r\n});\r\n\r\nvar storeText = Ti.UI.createLabel({\r\n\twidth:Ti.UI.SIZE,\r\n\tleft:5,\r\n\ttop:2,\r\n\ttext:\"Current location\",\r\n\tcolor: '#FFF',\r\n\theight:Ti.UI.SIZE,\r\n\tfont:{fontSize:16,fontWeight: 'bold',fontFamily:'Helvetica Neue'}\r\n});\r\ncustomView.add(storeText);\r\n\r\nvar address = Ti.UI.createLabel({\r\n\twidth:Ti.UI.SIZE,\r\n\tleft:5,\r\n\ttop:2,\r\n\ttext:\"Chennai\",\r\n\tcolor: '#FFF',\r\n\theight:Ti.UI.SIZE\r\n});\r\ncustomView.add(address);\r\n\r\nvar phoneNumber = Ti.UI.createLabel({\r\n\twidth:Ti.UI.SIZE,\r\n\tleft:5,\r\n\ttop:0,\r\n\ttext:'+91999999999',\r\n\tcolor: '#FFF',\r\n\theight:Ti.UI.SIZE\r\n});\r\ncustomView.add(phoneNumber);\r\n\r\nvar cLocation = Titanium.Map.createAnnotation({\r\n latitude:45,\r\n longitude:11,\r\n leftView: customView,\r\n //title: ' '\r\n});\r\nmyAnnotations.push(cLocation);\r\n\r\nmapview.annotations = myAnnotations;\r\n\r\nwin1.open();\r\n{code}\r\n\r\nRunning on Android, everything looks nice (see screenshot); on iOS, the annotation is not shown. If I uncomment the line with 'title', the annotation appears, but the default iOS background appears, and the custom view is not visible (screenshot as well).", "attachment": [ { "id": "34836", "filename": "Screen Shot 2013-01-18 at 2.15.36 PM.png", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-01-18T06:15:56.000+0000", "size": 59751, "mimeType": "image/png" }, { "id": "34837", "filename": "Screen Shot 2013-01-18 at 2.15.51 PM.png", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-01-18T06:15:56.000+0000", "size": 168531, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: customized Ti.Map.Annotation not working", "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.4\r\nSDK 3.0.0\r\niOS 6", "comment": { "comments": [ { "id": "235217", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "iOS limitation.\nNeed the title property if the callout needs to appear.\nLeftview and rightview callout properties must have a height of 32 or less", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-01-21T18:06:27.000+0000", "updated": "2013-01-21T18:06:27.000+0000" }, { "id": "416173", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the above comment.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T16:27:44.000+0000", "updated": "2017-03-29T16:27:44.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }