Skip to content

Allows native google maps to run within Codename One applications

Notifications You must be signed in to change notification settings

kutoman/codenameone-google-maps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codename One Google Native Maps Support

Allows Codename One developers to embed native Google Maps on iOS/Android or fallback to Codename One MapComponent on other platforms. Check out a brief tutorial on using this project here: http://www.codenameone.com/blog/mapping-natively.html

Limitations

  1. The native maps are only supported on Android devices that have the Google Play store (e.g. not on Amazon Kindle) and on iOS devices. All other devices will show the MapComponent by default. Map component will be used on the simulator as well.

  2. Since a native component is used placing overlays is problematic. You will need to use Dialogs and the API's of the MapContainer class to implement this.

Configuration

The configuration portion is the hardest part, Google made it especially painful in the Google typical way. You can follow the instructions from Google to get started for Android, for iOS, and for Javascript.

You will need to follow their instructions to generate your map keys. Then define the following build arguments within your project:

javascript.googlemaps.key=YOUR_JAVASCRIPT_API_KEY
android.xapplication=<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="YOUR_ANDROID_API_KEY"/>
ios.afterFinishLaunching=[GMSServices provideAPIKey:@"YOUR_IOS_API_KEY"];

Make sure to replace the values YOUR_ANDROID_API_KEY, YOUR_IOS_API_KEY, and YOUR_JAVASCRIPT_API_KEY with the values you obtained from the Google Cloud console by following the instructions for Android , for iOS, and for Javascript.

This project was migrated from an old project on Google code http://code.google.com/p/codenameone-google-maps

About

Allows native google maps to run within Codename One applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 64.6%
  • HTML 14.4%
  • JavaScript 12.0%
  • Objective-C 7.7%
  • C# 1.3%