Differences between the Amazon Maps API and Google Maps API (v2.0 - Deprecated)
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.
However, there are some features that are not supported. In these cases, the Amazon Maps API includes stub methods, but they do not function.
- Unsupported Features
- Using Strict Mode to Identify the Use of Unsupported Features
- Deprecated Location APIs
- Next Steps
The following features are not available in Amazon Maps:
|Feature||Related Methods and Classes|
|Street View||The API provides stubs for the street view classes and methods. All street view methods return
|Flat markers||Flat markers are not supported. Setting
|Draggable Markers||Dragging markers is not supported. Setting
|Large font support||Enabling the large font option on the device does not change the text size of map labels.|
|Lite Mode API||The Lite mode methods are not supported. Calling the
Using Strict Mode to Identify the Use of Unsupported Features
Normally, calling the methods for unsupported features has no effect. The method silently fails. For example, calling
Marker.setFlat(true) does not change the appearance of the marker displayed on the map.
You can optionally turn on strict mode. Strict mode causes these methods to log warnings or throw exceptions instead of silently failing. This can be useful during testing for detecting any unsupported features your app is using.
To enable strict mode, add the following XML to your app's
AndroidManifest.xml, within the
<meta-data android:name="amazon.maps.strictmode.ApiPolicy" android:value="strictModeLevel" />
strictModeLevel to one of these values:
log— Calling an unsupported method logs a warning in LogCat.
throw— Calling an unsupported method throws a
log,throw— Calling an unsupported method logs a warning in LogCat and throws the
The strict-mode option applies to all of the methods for unsupported features noted above.
To disable strict mode, completely remove the meta-data element containing
amazon.maps.strictmode.ApiPolicy from your manifest file.
For example, the following code adds a marker at the geographic location (latitude / longitude) represented by
point to the map referenced by
MarkerOptions opt = new MarkerOptions() .title("New Marker") .position(point) .draggable(true); Marker m = mMap.addMarker(opt);
When strict mode is not enabled, this code runs normally and places the marker at the location specified by
.draggable option is set to
true, but since this feature is not supported, this has no effect on the marker.
When strict mode is enabled with the
log option, the above code adds the marker normally, but also generates a message in the
D/MapsApi-Strict(18307): MAPS API STRICT MODE VIOLATION: Draggable markers are not supported in this release of AmazonMaps.
When strict mode is enabled with the
throw option, the above code throws a
StrictModeException exception for attempting to set
Because strict mode detects unsupported features during testing, you can decide the best way to work around those features before releasing your app.
Deprecated Location APIs
The Amazon Maps v2 API includes the following location APIs for compatibility with the Google Maps API:
To learn how to migrate your app from the Google Maps API to the Amazon Maps API, see Migrating an App from Google Maps v2.
For information about registering your app for map tiles and testing your app, see Registering and Testing Your Amazon Maps API v2 App.
To learn more about performing common tasks in the Amazon Maps API, see Understanding the Amazon Maps API v2.
For additional help and information, see the Amazon Maps API Frequently Asked Questions.