Hi,
I'm facing this problem since fews days, I can't get an image of my mapview on Android. This is working perfectly on IOS.
I have created a mapview, I added it to one of my Alloy view.
var mapview = Map.createView({ mapType : Map.NORMAL_TYPE, animate : true, region : region, regionFit : true, userLocation : false, visible : true, top : 0, width : '100%' });
//I Add annotations and a path ... I skipped this part
$.mapContainer.add(mapview)
//My map is showing perfectly on the screen
function onClickShare() {
var Blob = $.mapContainer.toImage();
// I tried also : $.mapContainer.toImage().media, mapview.toImage(), and mapview().toImage.media
// .media is not valid image, mapview.toImage() gives me same result
var file = Titanium.Filesystem.getFile(Titanium.Filesystem.tempDirectory, 'share_map.png');
file.write(Blob);
//Calling my functions to share on social networks
shareHelper.share();
}
My image is existing, the only thing is that I get an empty map :
http://postimg.org/image/i1u0emfyr/
I 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.
Hi, I have tested this issue . This is a valid bug. My Environment :
Thanks