Home > Services & APIs > Build > Maps

Getting Started with the Amazon Maps API v2

Introduction

Introduction

With the Amazon Maps API v2, you can quickly and easily create mapping applications for Amazon devices. Your app can integrate high-quality 3D maps with fluid zooming and panning.

You can integrate the Maps API into your app in two different ways:

  • Code against Amazon Maps classes and methods directly. By using the Amazon Maps API, your app will be able to take advantage of new Amazon features and tools as they become available.
  • Migrate your existing Google Maps API app by making some minor code changes and then re-compiling your app against the Amazon Maps API. This option lets you use your existing Google Play-compatible code to create an Amazon version of your app for Fire phone and Fire tablet devices.

Regardless of how you choose to integrate Amazon maps into your app, your app can take advantage of these Amazon Maps API features:

  • Display high-quality 3D vector maps with fluid zooming and panning
  • Display standard, hybrid, and satellite map tiles
  • Use Fragments
  • Display location data
  • Handle user interaction with the map
  • Add markers to show a specific locations on the map
  • Draw polylines to connect two or more locations
  • Draw polygons to highlight a neighborhood or circle an area 

The Maps v2 API is supported on the following devices running FireOS 4.5 or later:

  • Fire Phone
  • Fire Tablets (3rd Generation and later)

Earlier tablets do not support the Maps API v2.

Setting Up Your Development Environment

Before you can build and test your app, you need to set up your development environment by installing the following on your development computer:

  • The Android SDK
  • Any Android SDK system requirements, including the JDK
  • An integrated development environment (IDE), if desired

While you can use the Amazon Maps API with any development environment, this guide demonstrates using both Eclipse and Android Studio.

Coding and Compiling Against Amazon Maps Directly

In this option, you code and compile your project against the Amazon Maps API Support Library. You can then run your app on the supported Fire phone and Fire tablet devices and distribute your app in the Amazon Appstore for Android.

To code against the Amazon Maps API:

  1. Set up your development environment for creating Android apps for Fire phone and/or Fire tablets. See Setting Up Your Development Environment.
  2. Download the Amazon Maps API Support Library and configure your project to reference it. See Configuring Your Project to use the Amazon Maps API v2.
  3. Register your app to download map tiles. See Registering and Testing Your Amazon Maps API v2 App.
  4. Review the developer guides and reference materials to learn about the Amazon Maps API classes and methods:
  5. Test your app and submit it to the Amazon Appstore for Android. See Registering and Testing Your Amazon Maps API v2 App.

Migrating Your App from Google Maps v2

In this option, you make some minor code changes in your app and then compile your project against the Amazon Maps API Support Library. You can then run your app on the supported Fire phone and Fire tablet devices and distribute your app in the Amazon Appstore for Android.

To migrate your app from Google Maps:

  1. Review the Differences between the Amazon Maps API v2 and Google Maps API v2 document and note any features that may work differently.
  2. Set up your development environment for creating Android apps for Fire phone and/or Fire tablets. See Setting Up Your Development Environment.
  3. Download the Amazon Maps API Support Library and configure your project to reference it. See Configuring Your Project to use the Amazon Maps API v2.
  4. Rename Google-specific namespaces, classes, and XML attributes in your code to the Amazon-named versions and update the AndroidManifest.xml file as needed. See Migrating an App from Google Maps v2.
  5. Register your app to download map tiles. See Registering and Testing Your Amazon Maps API v2 App.
  6. Test your app and submit it to the Amazon Appstore for Android. See Registering and Testing Your Amazon Maps API v2 App.

The Amazon Maps API offers interface parity with version 2 of the Google Maps API. Most classes and method calls in your Google Maps-compatible app work the same on Amazon devices. For information about the differences, see Differences between the Amazon Maps API v2 and Google Maps API v2.