leonardoamx / air-maps-ane

Automatically exported from code.google.com/p/air-maps-ane
0 stars 0 forks source link

A problem for drawViewPortToBitmapData #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
My code is:
var mapDisp:Map = new Map();
var mapViewPort:Rectangle = new Rectangle(1,1,200,200);
mapDisp.viewPort = mapViewPort;
var mapBitmap:BitmapData = new BitmapData(200,200);
mapDisp.drawViewPortToBitmapData(mapBitmap);
mapImage.source = new Bitmap(mapBitmap);

If I set "mapDisp.visible=false",the mapImage is display blank;
I must set "mapDisp.visible=true",the mapImage is display,but "mapViewPort” 
display before on all Object,Blocked everything.
How can I modi code to can not  display "mapViewPort" and put "mapViewPort" in 
"mapBitmap"?

Thank you very much!

Original issue reported on code.google.com by zhang...@gmail.com on 28 Jun 2012 at 5:18

GoogleCodeExporter commented 9 years ago
Here Map is a native UIView so it will come in front of all Flash Display 
Objects. If you want to show Flash Objects on top of Map, 
drawViewPortToBitmapData is the only way to go for now. I have added changes to 
show minor things like pins, annotations but they are in my workspace now. Will 
push the changes soon.

Jut a workaround for now : Try setting the viewport to something out of stage 
bounds and set mapDisp.visible = true. This way the view will not visible to a 
user. After that you can take it into bitmapData and then set .visible to false 
again.

I purposely blocked this in Map.as in AS Library here 
(http://code.google.com/p/air-maps-ane/source/browse/branches/main/AS/iOS/iMaps/
src/com/adobe/nativeExtensions/maps/Map.as#165). You can remove that check by 
modifying ASLibrary and create a new .ane

Original comment by shahme...@gmail.com on 28 Jun 2012 at 6:01

GoogleCodeExporter commented 9 years ago

Original comment by shahme...@gmail.com on 25 Aug 2012 at 5:48