{ "id": "110090", "key": "TIMOB-12836", "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": "15272", "description": "2013 Sprint 04 API", "name": "2013 Sprint 04 API", "archived": true, "released": true, "releaseDate": "2013-02-25" }, { "id": "14814", "description": "2013 Sprint 04", "name": "2013 Sprint 04", "archived": true, "released": true, "releaseDate": "2013-02-25" } ], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2013-02-25T04:39:03.000+0000", "created": "2013-02-24T07:12:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-mapv2" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-13T21:43:37.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 clicking on a pin on a map, an event listener will fire when the pin is clicked and the pin will then be selected. If you click again, the pin is deselected. A third click is expected to fire the event listener and select the pin but nothing happens. Only when another item is clicked (either another pin or the map itself) will the original pin be clickable again.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({fullscreen: false, backGroundColor: 'white'});\r\n\r\n//create a couple annotations\r\nvar anno = MapModule.createAnnotation({latitude: 28.606024, pincolor: MapModule.ANNOTATION_RED, longitude: 77.361800, title: \"Noida\", subtitle: \"A point\", draggable: true});\r\nvar anno2 = MapModule.createAnnotation({latitude: 28.609527703349123, pincolor: MapModule.ANNOTATION_BLUE, longitude: 77.36846454441547, title: \"Noida 2\", subtitle: \"Another point\", draggable: true});\r\n\r\n// create labels to show what is going on\r\nvar label1 = Ti.UI.createLabel({text:'Map load event:',width: '100%',top: 10, left :5,color:'#444'});\r\nvar label2 = Ti.UI.createLabel({text:'Map region event:',width: '100%',top: 10, left:5,color:'#444'});\r\nvar label3 = Ti.UI.createLabel({text:'Map click event:',width: '100%',top: 10, left:5,color:'#444'});\r\nvar label4 = Ti.UI.createLabel({text:'Click event source:',width: '100%',top: 10, left:5,color:'#444'});\r\nvar label5 = Ti.UI.createLabel({text:'Map:',width: '100%',top: 10, left:5,color:'#444'})\r\nvar label6 = Ti.UI.createLabel({text:'Annotation: Title: Subtitle: ',width: '100%',top: 10, left:5,color:'#444'});\r\nvar label7 = Ti.UI.createLabel({text:'Lat & Lon:',width: '100%',top: 10, left:5,color:'#444'});\r\n\t\r\n\r\n// create the map\r\nvar map = MapModule.createView({\r\n\tuserLocation: true,\r\n\tmapType: MapModule.NORMAL_TYPE,\r\n\tanimate: true,\r\n\tannotations: [anno, anno2],\r\n\tregion: {latitude: 28.605924, longitude: 77.361817, latitudeDelta: 0.05, longitudeDelta: 0.05 },\r\n\ttop: '50%' //Noida\r\n});\r\n\r\n//make a button to go to Noida/MV\r\nvar button=Ti.UI.createButton({\r\n\ttitle: \"Region\",\r\n\ttop: 0,\r\n\tright: 0\r\n});\r\n\r\n// set variables for location\r\nvar location =\"noida\";\r\n\r\n// toggle location with listener\r\nbutton.addEventListener('click', function(){\r\n\tif (location===\"noida\") {\r\n\t\tmap.region={latitude: 37.390665, longitude: -122.050210, latitudeDelta: 0.05, longitudeDelta: 0.05 };\r\n\t\tlocation=\"mv\";\r\n\t} else {\r\n\t\tmap.region={latitude: 28.605924, longitude: 77.361817, latitudeDelta: 0.05, longitudeDelta: 0.05 };\r\n\t\tlocation=\"noida\";\r\n\t}\r\n});\r\n\r\n//create a view for the tet fields\r\nvar stuffView = Ti.UI.createView ({\r\n\ttop:0,\r\n\theight:'50%',\r\n\tlayout: 'vertical',\r\n\t//bottom:'30%',\r\n\tbackgroundColor:\"black\"\r\n});\r\n\r\n// add listener for map load\r\nmap.addEventListener('complete', function(e){\r\n\tlabel1.color='red';\r\n\tlabel1.text=\"Map load event: FIRED\";\r\n\tsetTimeout(function()\r\n\t\t\t{\r\n\t\t\t\tlabel1.color = '#444';\r\n\t\r\n\t\t\t},500);\r\n\t\r\n});\r\n\r\n// listener for region changed\r\nmap.addEventListener('regionchanged', function(e){\r\n\t\r\n\tlabel2.color='red';\r\n\tlabel2.text=\"Map region event: FIRED\";\r\n\tlabel7.color='red';\r\n\tlabel7.text=\"Lat & Lon:\"+e.latitude+\" \"+e.longitude;\r\n\tsetTimeout(function()\r\n\t\t\t{\r\n\t\t\t\tlabel2.color = '#444';\r\n\t\t\t\tlabel7.color ='#444';\r\n\t\t\t},200);\r\n});\r\n\r\n// Add event listenr to update text fields\r\nmap.addEventListener('click', function(e) {\r\n\tlabel3.color = 'red';\r\n\tlabel3.text=\"Map click event: FIRED\";\r\n\tlabel4.color = 'red';\r\n\tlabel4.text=\"Click event source: \"+e.clicksource;\r\n\tlabel5.color = 'red';\r\n\tlabel5.text=\"Map: \"+e.map;\r\n\tlabel6.color = 'red';\r\n\tlabel6.text=\"Annotation: Title: Subtitle: \"+e.annotation+\" \"+e.title+\" \"+e.subtitle;\r\n\tlabel7.color = 'red';\r\n\tlabel7.text=\"Lat & Lon:\"+e.latitude+\" \"+e.longitude;\r\n\t\r\n\t\r\n\t//change the text color\r\n\tsetTimeout(function()\r\n\t\t\t{\r\n\t\t\t\tlabel3.color = '#444';\r\n\t\t\t\tlabel4.color = '#444';\r\n\t\t\t\tlabel5.color = '#444';\r\n\t\t\t\tlabel6.color = '#444';\r\n\t\t\t\tlabel7.color = '#444';\r\n\t\t\t},100);\r\n});\r\n\r\n// add the labels and texfields to the window\r\nstuffView.add(label1);\r\nstuffView.add(label2);\r\nstuffView.add(label3);\r\nstuffView.add(label4);\r\nstuffView.add(label5);\r\nstuffView.add(label6);\r\nstuffView.add(label7);\r\n\r\nwin.add(stuffView);\r\nwin.add(button);\r\n\r\n//add the map\r\nwin.add(map);\r\nwin.open();\r\n{code}\r\n\r\nSteps to reproduce:\r\n1) Use sample code above in your pre-configured app with Google map API v2 key\r\n2) Click a pin - note it is selected and the event listener fires\r\n3) Click the same pin again - note it is deselected but the listener doesn't fire\r\n4) Click the same pin again\r\n\r\nResult:\r\nNothing happens. The pin is not selected, the listener doesn't fire.\r\n\r\nExpected:\r\nThe listener fires and the pin is selected.\r\n", "attachment": [], "flagged": false, "summary": "Mapsv2 Module: Click event listener stops firing for map pin when clicking the pin twice", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OS X 10.8.2\r\nMap Module v2", "comment": { "comments": [ { "id": "239600", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a known android issue. I've tested with their native sample app and was able to reproduce the same problem. Here's the link to the issue: http://code.google.com/p/gmaps-api-issues/issues/detail?id=4760. ", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-25T04:38:01.000+0000", "updated": "2013-02-25T04:38:01.000+0000" }, { "id": "239710", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I was comparing native behavior on the v1 API. Hieu demonstrated the behavior for the native v2 sample which is the same as I am seeing on our test app.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-25T20:56:59.000+0000", "updated": "2013-02-25T20:56:59.000+0000" }, { "id": "411596", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as this is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T21:43:37.000+0000", "updated": "2017-03-13T21:43:37.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }