{ "id": "166163", "key": "TIMOB-24425", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-22T11:40:09.000+0000", "created": "2017-02-21T13:06:22.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "ios", "map", "performance" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-06-29T18:14:43.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When adding a Polyline with 1370 points to the map my app freezes and will show the \"not responding - wait or kill\" message when you click on an empty map field (not on annotation).\r\n\r\nResponsible is this part:\r\nhttps://github.com/appcelerator-modules/ti.map/blob/master/android/src/ti/map/TiUIMapView.java#L834\r\n\r\nThat will check all lines/points which takes a long time. Since I don't want the line to be clickable at all it would be good to have a \"touchEnabled()\" parameter for a Polyline to skip the check. Removing the polyline will result in an instant click response!\r\n\r\nDevice: Samsung Galaxy S 4mini\r\nTi.Map: Version 3.1.0\r\n\r\n\r\nDemo:\r\n\r\n{code:java}\r\nvar win1 = Titanium.UI.createWindow({\r\n title: 'Map',\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar Map = require('ti.map');\r\nvar mapview = Map.createView({\r\n});\r\n\r\nvar p = []\r\nfor (var i = 0; i < 1000; ++i) {\r\n p.push({\r\n \"longitude\": Math.random()*10 + 2,\r\n \"latitude\": Math.random()*10 + 45\r\n });\r\n}\r\n\r\nvar polyline = Map.createPolyline({\r\n points: p,\r\n touchEnabled: false,\r\n strokeWidth: 5,\r\n strokeColor: '#f00'\r\n});\r\nmapview.addPolyline(polyline);\r\n\r\nwin1.add(mapview);\r\n\r\nmapview.addEventListener(\"click\", function(e) {\r\n console.log(e.source);\r\n});\r\nwin1.open();\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Ti.Map: Add touchEnabled to PolylineProxy to improve click-performance", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "407501", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator-modules/ti.map/pull/199\r\n\r\nChanging {{touchEnabled}} to {{true}} will freeze the app when you click on the map. With {{false}} it is still usable and you can click everywhere", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-21T19:52:32.000+0000", "updated": "2017-02-21T19:52:32.000+0000" }, { "id": "407619", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Thanks for submitting the request. Our engineers will consider it.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-22T20:00:29.000+0000", "updated": "2017-02-22T20:00:29.000+0000" }, { "id": "408229", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Left some early review comments and set [~gmathews] as the reviewer.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-01T18:02:19.000+0000", "updated": "2017-03-01T18:02:19.000+0000" }, { "id": "419313", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Implemented iOS for parity as well, we also decided to use the check for all overlays (polygons, polylines & circles).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-08T18:30:01.000+0000", "updated": "2017-05-08T18:30:01.000+0000" }, { "id": "423160", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with map module 3.1.2 for Android & 2.10.0 for IOS.\r\n\r\nThe property {{touchEnabled}} works as expected when used for polyline, circle & polygon.\r\nClosing.\r\n\r\nStudio Ver: 4.9.0.201705302345\r\nSDK Ver: 6.1.1.GA\r\nOS Ver: 10.12.3\r\nXcode Ver: Xcode 8.3.3\r\nAppc NPM: 4.2.9\r\nAppc CLI: 6.2.2\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.9.11\r\nNode Ver: 6.10.1\r\nJava Ver: 1.8.0_101\r\nDevices: ⇨ google Nexus 5 --- Android 6.0.1\r\n ⇨ google Pixel --- Android 7.1.1\r\nSimulator: IOS 10.3.1 iphone 7", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-29T18:14:19.000+0000", "updated": "2017-06-29T18:14:19.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }