Important update for the NativeMaps ANE

As of today, we've released an important update to the NativeMaps ANE.

Summary of features

  • Android 4.4 (KitKat) visibility problems fixed (see below for information)
  • Added functionality to get BitmapData of map view in Android
  • Android NativeMapEvent.MAP_CREATED event should now be more reliable
  • Important: New meta tag required for Android descriptor (see below)

Android 4.4 fixes
The main addition is a fix to resolve problems with the map visibility on devices running Android 4.4 (KitKat). Using the new version of the Android NativeMaps ANE (version 2.0), maps should now be visible on KitKat devices.

Unfortunately there is a downside to this, because of the change in z-order rendering required, the UI buttons on the map will not be visible in KitKat. This includes the zoom controls and the user location control buttons which normally appear above the map. It's recommended to provide additional UI controls in your application if these buttons are required.

Android BitmapData now available!
Retrieving a BitmapData object of the map view is now possible in Android. The old method (for iOS) drawMapToBitmapData() is now deprecated in favour of the new method requestMapBitmapData().

You should now listen for the new event type NativeMapBitmapEvent.READY, and retrieve the BitmapData object from the event payload. This is standard across iOS and Android now.

AIR SDK
It's strongly recommended to use the AIR 4.0 SDK or newer for your application. The fixes for the NativeMaps ANE on Android may not work correctly for older versions of the AIR SDK.

New meta tag required for Android descriptor
As of this version, you must now include an additional meta tag in your descriptor XML. The following entry should be added inside the section of your Android manifest. You can place it below the google maps API key entry.

<meta-data android:name="com.google.android.gms.version" android:value="4030500"/>

Also, you must ensure that your Android manifest permissions include android.permission.ACCESS_NETWORK_STATE

As always, please let us know if you encounter any problems!

2 thoughts on “Important update for the NativeMaps ANE”

  1. Hi,

    The map is working on iOS.
    On Android, it’s working on samsung (kitkat), google nexus (lollypop), but on htc with (ice cream sandwich) the map is not showing, it’s not showing grey tiles, only the map controls appear & the google logo water mark on the bottom
    It’s so weird that this is happening, i’m using the following manifestAdditions tags. (please note that i’m using 2 other native extension along with this one.
    Any help would be really appreciated, thx.

    <![CDATA[

    ]]>

Leave a Reply

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