We've released another update to the NativeMaps ANE, which includes some new features and changes.
Getting BitmapData of the map view (iOS only)
Firstly, we've added a new method to allow you to draw the current map view to a BitmapData object on iOS. Unfortunately due to the way Android renders maps internally, it is currently not possibly to do this in the Android version.
Example:
var bmd:BitmapData = NativeMaps.service.drawMapToBitmapData();
Custom marker icon changes
This is a breaking change to the way custom marker icons are used. This new method should make it easier and less memory intensive when using a lot of custom icons.
This example shows how you should create and use custom markers now:
var icon:CustomMarkerIcon = new CustomMarkerIcon("myCustomIcon", someBitmap.bitmapData); NativeMaps.service.addCustomMarkerIcon( icon ); var marker:MapMarker = new MapMarker("someMarker"); marker.customIconId = "myCustomIcon";
This new change also fixes a possible bug that could have occurred when using many different custom markers on a map.
As always we'd love to hear feedback about our ANEs, so feel free to get in touch.