{ "id": "110861", "key": "TIMOB-13007", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15397", "description": "2013 Soprint 07 API", "name": "2013 Sprint 07 API", "archived": true, "released": true, "releaseDate": "2013-04-08" }, { "id": "15105", "description": "2013 Sprint 07", "name": "2013 Sprint 07", "archived": true, "released": true, "releaseDate": "2013-04-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-29T22:20:07.000+0000", "created": "2013-03-08T17:08:30.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "mapv2", "qe-testadded" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [ { "id": "27043", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "111724", "key": "TIMOB-13221", "fields": { "summary": "Android: Maps V2 Module - addAnnotations method not working on a map", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "27225", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "110857", "key": "TIMOB-13004", "fields": { "summary": "Android: Maps V2 Module - Annotations issues", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-09-25T06:53:38.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": "h6.Expected results\r\nA alert dialog should pop up and the info should be logged\r\n\r\nh6.Actual results\r\nOn DDMS but nothing happens.\r\n\r\nh6.Steps to reproduce \r\nPlease add an Click Event Listener for Map or use sample below on project under test (attached on Timob-13004 as well).\r\n\r\n{code}\r\n//FirstView Component Constructor\r\nfunction FirstView() {\r\n\r\nvar self = Ti.UI.createView();\r\n\r\nvar MapModule = require('ti.map');\r\n \r\nvar map1 = MapModule.createView({\r\n userLocation: true,\r\n mapType: MapModule.NORMAL_TYPE,\r\n animate: true,\r\n region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney\r\n height: '80%',\r\n top: 0,\r\n left: 0,\r\n width: '100%'\r\n});\r\n\r\nvar anno1 = MapModule.createAnnotation({\r\n latitude: -33.86665,\r\n longitude: 151.20689,\r\n title: \"Anno2\",\r\n subtitle: \"Ann2 subtitle\",\r\n animate: true,\r\n id: 33\r\n });\r\n anno1.image = '/mbanking/images/Locations-Pin-Android-red-hdpi.png';\r\n anno1.rightButton = '/images/locations-android-popover-arrow.png';\r\n anno1.rightButton.height = 44;\r\n anno1.rightButton.width = 46;\r\n\r\nvar anno2 = MapModule.createAnnotation({\r\n latitude: -33.87365,\r\n longitude: 151.20689,\r\n title: \"Anno2\",\r\n subtitle: \"Ann2 subtitle\",\r\n animate: true,\r\n id: 43\r\n });\r\n anno2.image = '/mbanking/images/Locations-Pin-Android-red-hdpi.png';\r\n anno2.rightButton = '/images/locations-android-popover-arrow.png';\r\n anno2.rightButton.height = 44;\r\n anno2.rightButton.width = 46;\r\n\r\nvar anno3 = MapModule.createAnnotation({\r\n latitude: -33.87964,\r\n longitude: 151.21130,\r\n title: \"Anno3\",\r\n subtitle: \"Ann3 subtitle\",\r\n animate: true,\r\n id: 45\r\n });\r\n anno3.image = '/mbanking/images/Locations-Pin-Android-red-hdpi.png';\r\n anno3.rightButton = '/images/locations-android-popover-arrow.png';\r\n anno3.rightButton.height = 44;\r\n anno3.rightButton.width = 46;\r\n\r\n\r\nvar anns = [];\r\nanns.push(anno1);\r\nanns.push(anno2);\r\nanns.push(anno3);\r\nmap1.addAnnotations(anns);\r\n\r\n\r\n\r\n\r\nsetTimeout(function () {\r\n map1.selectAnnotation(anno1, true);\r\n map1.setHeight('100%');\r\n}, 8000);\r\n\r\n\r\nmap1.addEventListener('click', function(e) {\r\n var alert = Ti.UI.createAlertDialog({\r\n title: 'Clicked!',\r\n message: 'e.annotation.id: ' + e.annotation.id + \"e.annotation.index: \" + e.annotation.index \r\n });\r\n Ti.API.info(\"Annotation \" + e.title);\r\n alert.show();\r\n});\r\n\r\nself.add(map1);\r\n return self;\r\n}\r\n\r\nmodule.exports = FirstView;\r\n{code}\r\n\r\nh6.Additional details\r\nPublic link 2.1.3.MapsModule patched 2.1.3.GA SDK for use:\r\nhttp://dl.dropbox.com/u/34061091/mobilesdk-2.1.3.MapsModule-osx.zip", "attachment": [], "flagged": false, "summary": "Android: Maps V2 Module - Click Event Listeners not working on a map", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.1.3.MapsModule patched 2.1.3.GA SDK \r\nDroid Razr 2.3\r\nHTC Incredible running 2.3.4\r\nGalaxy Note 4.0.4\r\nti.map 2.0.0", "comment": { "comments": [ { "id": "242364", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce with the latest Maps V2 Module. The \"click\" event works fine. \n*Note:* Based on the [doc|http://docs.appcelerator.com/titanium/3.0/#!/api/Modules.Map.View-event-click], the click event is not fired every time the user clicks on the map. It is fired in two circumstances:\n1. If the user clicks on an annotation to select it.\n2. The user deselects an annotation.\nBTW, based on the doc, Annotation does not support the \"id\" or \"index\" property.\n\nHere is a simple test case:\n{code}\nvar MapModule = require('ti.map');\n\nvar win = Ti.UI.createWindow({fullscreen: false});\nvar anno = MapModule.createAnnotation({latitude: -33.87365, image: 'KS_nav_ui.png', longitude: 151.20689, title: \"Drag Me\", subtitle: \"Sydney is quite chill\", draggable: true});\nvar anno2 = MapModule.createAnnotation({latitude: -33.86365, pincolor: MapModule.ANNOTATION_BLUE, longitude: 151.21689, title: \"Drag Me 2\", subtitle: \"This is anno2\", draggable: true});\nvar anno3 = MapModule.createAnnotation({latitude: -33.85365, longitude: 151.20689, title: \"anno3\", subtitle: \"This is anno3\", draggable: false});\n\nvar map = MapModule.createView({\n\tuserLocation: true,\n\tmapType: MapModule.NORMAL_TYPE,\n\tanimate: true,\n\tannotations: [anno, anno2, anno3],\n\tregion: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney\n\ttop: '30%'\n});\n\nmap.addEventListener('click', function(e) {\n var alert = Ti.UI.createAlertDialog({\n title: 'Clicked!',\n message: 'e.annotation.id: ' + e.annotation.id + \"e.annotation.index: \" + e.annotation.index \n });\n Ti.API.info(\"Annotation \" + e.title);\n alert.show();\n});\n\nwin.add(map);\nwin.open();\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T00:51:05.000+0000", "updated": "2013-03-15T00:51:05.000+0000" }, { "id": "242374", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Simple sample posted initially reproduces the following (clicking any annotation):\r\n\r\n{code}\r\n03-14 19:12:21.382: E/TiApplication(24613): (main) [1061,5786] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 2.1.3.MapsModule,2013/03/04 08:32,15997d0\r\n03-14 19:12:21.382: E/TiApplication(24613): java.lang.NullPointerException\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat ti.map.TiUIMapView.onMarkerClick(TiUIMapView.java:369)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat com.google.android.gms.maps.GoogleMap$4.f(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat com.google.android.gms.internal.an$a.onTransact(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat android.os.Binder.transact(Binder.java:295)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat com.google.android.gms.maps.internal.IOnMarkerClickListener$Stub$Proxy.onMarkerClick(IOnMarkerClickListener.java:84)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.z.by.a(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.y.ba.a(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.y.d.c(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.y.bj.a(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.y.v.c(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.y.bf.onSingleTapConfirmed(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.d.v.onSingleTapConfirmed(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat maps.d.j.handleMessage(Unknown Source)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat android.os.Looper.loop(Looper.java:130)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat android.app.ActivityThread.main(ActivityThread.java:3859)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)\r\n03-14 19:12:21.382: E/TiApplication(24613): \tat dalvik.system.NativeStart.main(Native Method)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): FATAL EXCEPTION: main\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): java.lang.NullPointerException\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat ti.map.TiUIMapView.onMarkerClick(TiUIMapView.java:369)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat com.google.android.gms.maps.GoogleMap$4.f(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat com.google.android.gms.internal.an$a.onTransact(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat android.os.Binder.transact(Binder.java:295)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat com.google.android.gms.maps.internal.IOnMarkerClickListener$Stub$Proxy.onMarkerClick(IOnMarkerClickListener.java:84)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.z.by.a(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.y.ba.a(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.y.d.c(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.y.bj.a(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.y.v.c(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.y.bf.onSingleTapConfirmed(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.d.v.onSingleTapConfirmed(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat maps.d.j.handleMessage(Unknown Source)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat android.os.Looper.loop(Looper.java:130)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat android.app.ActivityThread.main(ActivityThread.java:3859)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)\r\n03-14 19:12:21.421: E/AndroidRuntime(24613): \tat dalvik.system.NativeStart.main(Native Method)\r\n03-14 19:12:21.429: W/ActivityManager(499): Force finishing activity com.map/.MaptestActivity\r\n03-14 19:12:21.476: W/ApplicationContext(499): Unable to create files directory\r\n03-14 19:12:21.500: I/gralloc(499): Allocated 0x20797469 size 1937072496\r\n03-14 19:12:21.929: W/ActivityManager(499): Activity pause timeout for HistoryRecord{40bea4e0 com.map/.MaptestActivity}\r\n03-14 19:12:21.968: D/ActivitityRenderTarget(875): onResume\r\n03-14 19:12:21.984: W/IMGSRV(875): eglglue.c:778: InitContext: ignoring buffer type CBUF_TYPE_PDS_VERT_SECONDARY_PREGEN_BUFFER\r\n03-14 19:12:21.992: I/gralloc(499): Allocated 0x660072 size 6488161\r\n03-14 19:12:22.140: I/gralloc(499): Allocated 0x660072 size 6488161\r\n03-14 19:12:22.195: I/gralloc(499): Allocated 0x660072 size 6488161\r\n03-14 19:12:22.265: I/gralloc(499): Allocated 0x660072 size 6488161\r\n{code}\r\n\r\nIt may be just one of the features was not supported but reported already for Map V2 Module.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T01:31:41.000+0000", "updated": "2013-03-15T01:32:17.000+0000" }, { "id": "242472", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Eduardo, the log you posted is a NPE which seems a bug in the module. I ran the original test case you posted with latest 3.1.0 SDK but it still works fine. Alert shows without any crash. Can you try it on 3.1.0 SDK to see if it works?", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T17:29:49.000+0000", "updated": "2013-03-15T17:29:49.000+0000" }, { "id": "242483", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks for clarifying, yes, it works. I should have updated to latest 3.1 SDK.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T18:19:20.000+0000", "updated": "2013-03-15T18:19:20.000+0000" }, { "id": "244198", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I can confirm that the click event works if you do not add the annotation via the addAnnotations method. If I add it while creating the map then the click event is fired.\n\nh6.Tested on\nDroid Razr 2.3.5 & patched SDK 2.1.3", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-03-26T22:57:30.000+0000", "updated": "2013-03-26T22:57:30.000+0000" }, { "id": "244368", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR to fix NPE: https://github.com/appcelerator/titanium_modules/pull/94", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-27T20:16:37.000+0000", "updated": "2013-03-27T20:30:33.000+0000" }, { "id": "272794", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment - \nAppcelerator Studio: 3.1.3.201309132456\nSDK: 3.1.3.GA\nacs: 1.0.6\nalloy: 1.2.2\nnpm: 1.3.2\ntitanium: 3.1.2\ntitanium-code-processor: 1.0.3\nDevice: Nexus 7 (v4.3)\nResult - Click event is fired on select/deselect the annotation. Also did not observe crash on clicking annotation. Hence closing this issue.", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-25T06:50:32.000+0000", "updated": "2013-09-25T06:50:32.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }