{ "id": "113273", "key": "TIMOB-13724", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-05-02T20:21:08.000+0000", "created": "2013-04-23T08:59:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "map", "mobilesdk", "module", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-17T17:56: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": "Adding one map view over another map view does not display map until we do some other activity and then launch the app.\r\n\r\nSteps to reproduce:\r\n1: Use the below mentioned code as sample to test.\r\n2: build the app using MapModule.\r\n3: deploy the app in android device and launch the app.\r\n4: press add one more map button.\r\n5: Second map is not displayed till now.\r\n6: press the recent app button if using nexus or some other activity.\r\n7: open app again and it will display map 2.\r\n\r\n**Sample code**\r\n{code}\r\nvar MapModule = require('ti.map');\r\nvar win = Ti.UI.createWindow({fullscreen: false});\r\nvar anno = MapModule.createAnnotation({latitude: -33.87365, image: 'map_pin.png', longitude: 151.20689, title: \"Sydney\", subtitle: \"Sydney is quite chill\", draggable: true});\r\nvar anno2 = MapModule.createAnnotation({latitude: -33.86365, pincolor: MapModule.ANNOTATION_BLUE, longitude: 151.21689, title: \"Anno2\", subtitle: \"This is anno2\", draggable: true});\r\nvar anno3 = MapModule.createAnnotation({latitude: -33.85365, longitude: 151.20689, title: \"Anno3\", subtitle: \"This is anno3\", draggable: false});\r\nvar anno4 = MapModule.createAnnotation({latitude: -33.86365, longitude: 151.22689, title: \"Anno4\", subtitle: \"This is anno4\", draggable: true});\r\n\r\nanno.addEventListener('click',function(e){\r\n\r\n alert(JSON.stringify(e));\r\n\r\n});\r\n\r\nTi.API.info (\"Latitude:\" + anno.latitude);\r\nTi.API.info (\"Title:\" + anno.title);\r\n\r\nvar map = MapModule.createView({\r\n userLocation: true,\r\n mapType: MapModule.NORMAL_TYPE,\r\n animate: true,\r\n annotations: [anno, anno2, anno4],\r\n region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 }, //Sydney\r\n top: '30%'\r\n});\r\nTi.API.info(\"userLocation: \" + map.userLocation);\r\nwin.add(map);\r\n\r\nmap.addEventListener('click', function(e) {\r\n Ti.API.info(\"Latitude: \" + e.latitude);\r\n Ti.API.info(\"Source: \" + e.clicksource);\r\n});\r\n\r\nvar button8 = Ti.UI.createButton({top: '20%', right: 0, title: \"Add one more Map\"});\r\nbutton8.addEventListener('click', function(e) {\r\n\r\n var ddd = Titanium.UI.createView({\r\n backgroundColor:\"#00F\",\r\n top:'30%',\r\n zIndex:10000\r\n });\r\n win.add(ddd);\r\n var mapdet = MapModule.createView({\r\n userLocation: true,\r\n mapType: MapModule.NORMAL_TYPE,\r\n animate: true,\r\n annotations: [anno, anno2, anno4],\r\n region: {latitude: 47.040182, longitude: -119.223633, latitudeDelta: 0.1, longitudeDelta: 0.1 } //Sydney\r\n });\r\n ddd.add(mapdet);\r\n});\r\n\r\n\r\nwin.add(button8);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Maps V2: One mapView added over another mapView will be displayed only once until user performs some other device activity", "creator": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "MapModule, Titanium SDK 3.1.0, Mobile SDK.", "comment": { "comments": [ { "id": "248744", "author": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Video Link Show casing the issue: http://youtu.be/U5lnWkF2Dqc", "updateAuthor": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-04-23T09:11:02.000+0000", "updated": "2013-04-23T09:11:02.000+0000" }, { "id": "249868", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Android Map v2 uses SurfaceView to draw the maps. You can't overlap 2 SurfaceViews. It is an Android limitation and you can find more info here: https://groups.google.com/forum/?fromgroups=#!topic/android-developers/COffLpanlz0\n\nOne possible workaround would be to remove the previous map then add the new one. \n{code}\nwin.remove(map);\nwin.add(ddd);\n{code}\n", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-02T00:39:01.000+0000", "updated": "2013-05-02T00:39:01.000+0000" }, { "id": "413509", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T17:56:37.000+0000", "updated": "2017-03-17T17:56:37.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }