Hi,

I am using Google Map API in my application and I want to export the contents 
of the map to PDF. For which I need to play with the bitmap data of the same. 
Something like:

var btMap:BitmapData = new BitmapData(map.width,map.height,false);
btMap.draw(map);

This is throwing an error:

[
SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: 
https://rwebqa.crawco.com/MainController.swf cannot access 
http://mt1.google.com/vt/lyrs=m@160000000&hl=en&src=api&x=8707&s=&y=13097&z=15&s=Ga.
 No policy files granted access.
        at flash.display::BitmapData/draw()
]

I googled around it and found similar cases and came to know that I need to use 
getPrintableBitmap() provided with the API to get the bitmap. I applied and is 
working fine.

Now, application also have a condition, where I have google map and other 
components as well in a single container and I need to export that container as 
PDF. And therefore stucked in the same problem again.

Is there any way that I can override the behavior of how the bitmapdata.draw() 
works ?

Or any suggestion/thoughts how can I achieve this ?

Because, I have a function in the API, its just I need to override something in 
the map component, so that the bitmap is obtained by the provided function 
getPrintableBitmap().

Thanks,
Vaibhav

Reply via email to