Native Maps ANE – New features and changes

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.

6 thoughts on “Native Maps ANE – New features and changes”

    1. You just need to load the image in the normal AIR way, either using a Loader, a File/FileStream or embedding the image in your code.

      Regards,
      Michael

    1. Hi,

      Unfortunately no, the native and flash layers are completely separate and native content will sit over the top of flash content.

      Cheers

  1. Hi,

    Is it possible to get the user location (Latitude & Longitude) on android, on iOS i’m using NativeMapEvent.USER_LOCATION_UPDATE but this is not possible on android, the problem is Adobe’s GeolocationEvent.UPDATE is buggy & doesn’t work all the times, sometimes you need to restart the device to make it work :s

Leave a Reply

Your email address will not be published. Required fields are marked *