{ "id": "90766", "key": "TIMOB-8864", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": null, "resolutiondate": null, "created": "2012-04-23T13:43:10.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:13.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Requesting click/longpress events on the mapView to return the latitude and longitude of the location that was pressed.\r\n\r\nh4. Steps to reproduce\r\nStep 1: run the code below\r\nStep 2: click somewhere on the map\r\nStep 3: once this is working the event should contain the lat and long of the location on the map that was clicked\r\n\r\nCurrently: the click doesn't fire unless you click on the annotation and longpress does fire but it does not return the lat and long of the event.\r\n\r\nThere is a module in the marketplace that does this, but it should be included in the sdk.\r\nhttps://marketplace.appcelerator.com/apps/1334\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow();\r\nwin.open();\r\n\r\nvar mountainView = Titanium.Map.createAnnotation({\r\n\tlatitude:37.390749,\r\n\tlongitude:-122.081651,\r\n\ttitle:\"Appcelerator Headquarters\",\r\n\tsubtitle:'Mountain View, CA',\r\n\tpincolor:Titanium.Map.ANNOTATION_RED,\r\n\tanimate:true,\r\n});\r\n\r\nvar mapview = Titanium.Map.createView({\r\n\tmapType: Titanium.Map.STANDARD_TYPE,\r\n\tanimate:true,\r\n\tregionFit:true,\r\n\tuserLocation:true,\r\n\tannotations:[mountainView]\r\n});\r\n\r\nwin.add(mapview);\r\n\r\nmapview.addEventListener('click', function(evt) {\r\n\tTi.API.info('click');\r\n\tTi.API.info(evt);\r\n});\r\nmapview.addEventListener('longpress', function(evt) {\r\n\tTi.API.info('longpress');\r\n\tTi.API.info(evt);\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: mapView - listen for clicks and longpress on the mapview", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 1.8.2\r\nTiSDK 2.0.1\r\niOS simulator 5.0", "comment": { "comments": [ { "id": "227822", "author": { "name": "qoerz", "key": "qoerz", "displayName": "Carlo Hermus", "active": true, "timeZone": "Europe/Berlin" }, "body": "In addition to this. No event, even longpress, is possible when using Mapview in android development. I do not care about the returning of the lat and long, sorry but 99 cents is not scaring me.", "updateAuthor": { "name": "qoerz", "key": "qoerz", "displayName": "Carlo Hermus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-11-17T21:59:14.000+0000", "updated": "2012-11-17T21:59:42.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }