Swiftpack.co - Package - tuarua/Google-Maps-ANE

GoogleMaps-ANE

Google Maps Adobe Air Native Extension for iOS 9.0+ and Android 19+. Also includes option to use Apple Maps on iOS.

ASDocs Documentation


Much time, skill and effort has gone into this. Help support the project

paypal


The ANE

Download the latest from the Releases page.

Android

The ANE + Dependencies

From the command line cd into /example and run:

  • OSX
bash get_android_dependencies.sh
  • Windows Powershell
PS get_android_dependencies.ps1

The dependencies can be downloaded directly from this repo: [https://github.com/tuarua/Android-ANE-Dependancies/tree/master/anes]

<extensions>
    <extensionID>com.tuarua.frekotlin</extensionID>
    <extensionID>org.greenrobot.eventbus</extensionID>
    <extensionID>com.google.android.gms.play-services-base</extensionID>
    <extensionID>com.google.android.gms.play-services-location</extensionID>
    <extensionID>com.google.android.gms.play-services-maps</extensionID>
    <extensionID>com.android.support.support-v4</extensionID>
    <extensionID>com.google.code.gson.gson</extensionID>
    ...
</extensions>

You will need a Google API key
[https://developers.google.com/maps/documentation/android-api/signup]

You will also need to include the following in your app manifest. Update accordingly.

<manifest android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
    <application android:enabled="true">
        <meta-data android:name="com.google.android.geo.API_KEY" android:value="[Your API_KEY]"/>
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <activity android:name="com.tuarua.googlemapsane.PermissionActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity android:excludeFromRecents="false" android:hardwareAccelerated="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

iOS

The ANE + Dependencies

N.B. You must use a Mac to build an iOS app using this ANE. Windows is NOT supported.

From the command line cd into /example and run:

bash get_ios_dependencies.sh

The folder, ios_dependencies/device/Frameworks, must be packaged as part of your app when creating the ipa. How this is done will depend on the IDE you are using.
After the ipa is created unzip it and confirm there is a "Frameworks" folder in the root of the .app package.


You will also need to include the following in your app manifest. Update accordingly.

<InfoAdditions><![CDATA[            
    <key>UIDeviceFamily</key>
    <array>
        <string>1</string>
        <string>2</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>9.0</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>Your message</string>
]]></InfoAdditions>

You will need a Google API key
[https://developers.google.com/maps/documentation/ios-sdk/get-api-key]

Prerequisites

You will need:

  • IntelliJ IDEA / Flash Builder
  • AIR 32.0.0.103 or greater
  • Xcode 10.1
  • Android Studio 3 if you wish to edit the Android source
  • wget on OSX
  • Powershell on Windows

References

  • [https://developers.google.com/maps/documentation/android-api/]
  • [https://developers.google.com/maps/documentation/ios-sdk/]
  • [https://kotlinlang.org/docs/reference/android-overview.html]

Github

link
Stars: 22
Help us keep the lights on

Dependencies

Used By

Total:

Releases

2.4.0 - May 31, 2019

  • Added mapView.buildingsEnabled setter replaces Settings.buildingsEnabled
  • Added mapView.trafficEnabled setter
  • Added mapView.minZoom setter
  • Added mapView.maxZoom setter
  • Added mapView.indoorEnabled setter
  • Added mapView.myLocationEnabled setter replaces Settings.myLocationEnabled
  • Added mapView.projection getter returning Projection class
  • Added Coordinate.toString() method
  • Added CoordinateBounds.toString() method
  • Added VisibleRegion class

2.3.0 - May 25, 2019

  • iOS: Updated to Google Maps SDK 3.1
  • add GroundOverlay support
  • add setBounds now takes CoordinateBounds as param

2.2.0 - Apr 19, 2019

  • Upgraded to AIR 32.0.0.116
  • AND: Updated to FreKotlin 1.7.0
  • iOS: Updated to FreSwift 3.1.0

2.1.0 - Mar 16, 2019

  • iOS: Refactor
  • AND: Updated to Android Play Services to 16.0.1

2.0.0 - Dec 24, 2018

  • AND: Updated to FreKotlin 1.6.0
  • Upgraded to AIR 32
  • iOS: Updated to FreSwift 3.0.0