{ "id": "124868", "key": "TIMOB-16242", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-02-19T13:44:50.000+0000", "created": "2014-01-16T10:48:28.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "V2", "android", "annotations" ], "versions": [], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2020-02-19T13:44:50.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": "When using leftView controls doesn't respond to events. I have tried first to put a view with buttons, no event fired when clicking on buttons. Then I have built a new sample with just a button as leftView, same problem.\r\n\r\nAnother problem, the rightButton property doesn't show the image, I have tried with different path string, same problem.\r\n\r\nLast problem :\r\nI have always this error message in console :\r\nGooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.\r\n\r\nbut it is installed in Android sdk and in device also. I'm not alone having this problem.\r\n\r\nhere's a sample code :\r\n\r\n{code}\r\nvar MapModule = require('ti.map');\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n \r\nvar btn = Ti.UI.createButton({title: 'Detail'});\r\n \r\nbtn.addEventListener('click',function(e)\r\n{\r\n Titanium.API.info(\"You clicked the button\");\r\n});\r\n \r\nvar bridge = MapModule.createAnnotation({\r\n latitude: -33.852222,\r\n longitude: 151.210556,\r\n pincolor: MapModule.ANNOTATION_AZURE,\r\n // Even though we are creating a button, it does not respond to Button events or animates.\r\n // Use the Map View's click event and monitor the clicksource property for 'leftPane'.\r\n leftView: btn,\r\n // For eventing, use the Map View's click event\r\n // and monitor the clicksource property for 'rightPane'.\r\n rightButton: '/images/boston_college.png', \r\n title: 'Sydney Harbour Bridge',\r\n subtitle: 'Port Jackson'\r\n});\r\n \r\n \r\nvar mapview = MapModule.createView({\r\n mapType: MapModule.NORMAL_TYPE,\r\n region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 },\r\n annotations: [bridge] //< add these annotations upon creation\r\n});\r\n \r\nwin.add(mapview);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Map V2 - Click event in map annotation is not working in leftview", "creator": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX 10.8.5 / SDK 3.2.0.GA", "comment": { "comments": [ { "id": "288758", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Have you tried my code ?\r\nMap View's click event also is not usable because you always have rightPane as click source, you never have the button. And strange thing when you click on the button, the annotation bubble becomes blue, like if there is a view on top of it.\r\nalso why rightButton or leftButton doesn't display it's image ?\r\n", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-19T09:58:55.000+0000", "updated": "2014-01-19T09:58:55.000+0000" }, { "id": "289198", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "pff no comments no reply on Q&A board, I'm stuck since 2 weeks because I cannot publish my app and my customer is grommeling.\r\nProbably the time to switch to \"Real\" native dev tools.", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-22T10:08:08.000+0000", "updated": "2014-01-22T10:08:08.000+0000" }, { "id": "292808", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "1.The left/rightView are converted to a bitmap so you can't really use button click event listener, you need to use map 'click' listener and look for clicksource of 'leftPane'.\n2. I'm seeing the right image with no problem...\n3. That error indicates that the resources are missing from google play services. This is due to our current limitations of using native module as a dependent for modules. This should be fixed soon.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-12T22:42:54.000+0000", "updated": "2014-02-12T22:42:54.000+0000" }, { "id": "292882", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "1 - the problem of clicksource is that I use the view with 3 buttons on it and no way to know which control receive the click event, in the previous version of map I had no problem.\r\n2 - I can confirm you that right or left image is not shown.", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-13T08:16:50.000+0000", "updated": "2014-02-13T08:16:50.000+0000" }, { "id": "293142", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Armindo,\r\n\r\n 1. The clicksource will return different values if users click on different views. The possible values for 'clicksource' are: pin, title, subtitle, leftPane, rightPane, infoWindow or null. Please see http://docs.appcelerator.com/titanium/latest/#!/api/Modules.Map.View-event-click for more details.\r\n\r\n 2. Can you attach the project that you are having issues with? ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-14T07:27:23.000+0000", "updated": "2014-02-14T07:27:53.000+0000" }, { "id": "293153", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Dear Hieu,\r\nwhat I mean is that I use on the left View, a TUIView with 3 TUIButtons inside it (just imagine a panel with 3 buttons on it), so for instance when the use click on the pin he has the choice to click on pictures, videos or some infos, so 3 buttons on this view.\r\nThe problem if I click pn one of these three buttons is that the click source is always 'leftPane', no way to know which button was clicked….\r\nThings that I was able to do previously.\r\nNow I'm stuck, all the app is based on this.", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-14T08:53:20.000+0000", "updated": "2014-02-14T08:53:20.000+0000" }, { "id": "293196", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here's a sample code :\r\n\r\n{code}\r\n// for creating the view :\r\nfunction createTheProjectView(selectedMapId) {\r\n\r\n\t\t\t\t\t\r\n\t\tvar projectAnnotView = Titanium.UI.createView({\r\n\t\t\theight : '32dp',\r\n\t\t\twidth : '110dp'\r\n\t\t});\r\n\r\n\t\tvar projectPhotoBtn = Titanium.UI.createButton({\r\n\t\t\tleft : \"2dp\",\r\n\t\t\twidth : \"32dp\",\r\n\t\t\theight : \"32dp\",\r\n\t\t\tbackgroundImage : '/images/photo.png',\r\n\t\t\tbackgroundDisabledImage : '/images/photo_disabled.png',\r\n\t\t\tbackgroundSelectedImage : '/images/photo_over.png'\r\n\t\t});\t\t\r\n\t\tprojectAnnotView.add(projectPhotoBtn);\r\n\r\n\t\tvar projectCameraBtn = Titanium.UI.createButton({\r\n\t\t\tleft : \"38dp\",\r\n\t\t\twidth : \"32dp\",\r\n\t\t\theight : \"32dp\",\r\n\t\t\tbackgroundImage : '/images/video.png',\r\n\t\t\tbackgroundDisabledImage : '/images/video_disabled.png',\r\n\t\t\tbackgroundSelectedImage : '/images/video_over.png'\r\n\t\t});\r\n\t\tprojectAnnotView.add(projectCameraBtn);\r\n\r\n\t\tvar projectDetailsBtn = Titanium.UI.createButton({\r\n\t\t\tleft : \"74dp\",\r\n\t\t\twidth : \"32dp\",\r\n\t\t\theight : \"32dp\",\r\n\t\t\tbackgroundImage : '/images/information.png',\r\n\t\t\tbackgroundDisabledImage : '/images/information_disabled.png',\r\n\t\t\tbackgroundSelectedImage : '/images/information_over.png',\r\n\t\t});\t\t\r\n\t\tprojectAnnotView.add(projectDetailsBtn);\r\n\t\t\r\n\t\treturn projectAnnotView;\r\n\t};\r\n\r\nwhen creating annotations :\r\nvar annotation = Map.createAnnotation({\r\n\t\t\t\tlatitude : lat,\r\n\t\t\t\tlongitude : lon,\r\n\t\t\t\ttitle : dat.title,\r\n\t\t\t\tsubtitle : dat.comment,\r\n\t\t\t\tleftButton : '/images/marqueurProjet.png',\r\n\t\t\t\tdataId : i, // Custom property to uniquely identify this annotation.\r\n\t\t\t\trightView:createTheProjectView(i),\r\n\t\t\t\tvideo : dat.video,\r\n\t\t\t\timages : dat.images\r\n\t\t\t});\r\n{code}\r\n\r\nHope this help.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-14T17:27:35.000+0000", "updated": "2014-02-14T20:00:37.000+0000" }, { "id": "293528", "author": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can confirm you also that pinImage, rightButon image and leftButton image doesn't work when you use something like image : '/images/marqueurProjet.png'\r\nyou always have to use image : 'marqueurProjet.png' and you have to pout the image in the resource folder, this is not a good thing to do when you want to deal with multiple densities on Android.\r\nthis bug has already been reported about a year ago in different places : https://developer.appcelerator.com/question/149070/android-google-map-v2-issue", "updateAuthor": { "name": "ads", "key": "ads", "displayName": "Armindo Da Silva", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-18T16:32:00.000+0000", "updated": "2014-02-18T16:32:00.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }