{ "id": "151723", "key": "TIMOB-19813", "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": null, "resolutiondate": null, "created": "2015-10-05T15:19:59.000+0000", "priority": null, "labels": [ "android", "empty", "map", "mapview", "toimage" ], "versions": [ { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:54:54.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Hi,\r\nI'm facing this problem since fews days, I can't get an image of my mapview on Android. This is working perfectly on IOS.\r\nI have created a mapview, I added it to one of my Alloy view.\r\nvar mapview = Map.createView({ mapType : Map.NORMAL_TYPE, animate : true, region : region, regionFit : true, userLocation : false, visible : true, top : 0, width : '100%' });\r\n//I Add annotations and a path ... I skipped this part\r\n$.mapContainer.add(mapview)\r\n//My map is showing perfectly on the screen\r\nfunction onClickShare() {\r\nvar Blob = $.mapContainer.toImage();\r\n\r\n// I tried also : $.mapContainer.toImage().media, mapview.toImage(), and mapview().toImage.media \r\n// .media is not valid image, mapview.toImage() gives me same result\r\n\r\nvar file = Titanium.Filesystem.getFile(Titanium.Filesystem.tempDirectory, 'share_map.png');\r\nfile.write(Blob);\r\n\r\n//Calling my functions to share on social networks\r\nshareHelper.share();\r\n}\r\nMy image is existing, the only thing is that I get an empty map : http://postimg.org/image/i1u0emfyr/\r\nI also tried to do a screenshot of the whole screen with Titanium.Media.takeScreenshot, I get all the elements of my view but map still empty.\r\n", "attachment": [ { "id": "56899", "filename": "Capture d’écran 2015-09-30 à 20.01.48.png", "author": { "name": "joakimm", "key": "joakimm", "displayName": "joachim mercier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-05T15:19:11.000+0000", "size": 34916, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: mapview.toImage() gives empty map", "creator": { "name": "joakimm", "key": "joakimm", "displayName": "joachim mercier", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "joakimm", "key": "joakimm", "displayName": "joachim mercier", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OSX Yosemite\r\nTitanium sdk 5.0.0GA\r\nAppcelerator studio 4.3.0\r\nTi.map 2.3.3\r\n Device (Galaxy note 2)\r\n Genymotion simulator (Google Nexus 5, API 22)", "comment": { "comments": [ { "id": "367973", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "body": "Hi,\r\nI have tested this issue . This is a valid bug.\r\nMy Environment :\r\n{code}\r\nDevice (Nexus 7 android 5.1.0)\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.10.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 0.10.37\r\n npm Version = 1.4.28\r\nTitanium CLI\r\n CLI Version = 5.0.5\r\nTitanium SDK\r\n SDK Version = 5.0.2.GA\r\n SDK Path = /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA\r\n Target Platform = android\r\n{code}\r\n\r\nThanks", "updateAuthor": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2015-10-27T10:40:47.000+0000", "updated": "2015-10-27T10:40:47.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }