Skip navigation

Category Archives: maps

The Elements of Amazon Maps

The Amazon Maps API consists of a core set of classes that combine to provide mapping capabilities in Android applications on the Kindle Fire. The key classes are:

MapActivity – A subclass of the Android Activity class, this provides the base class for activities that need to provide map support. Any activity that needs to work with maps must be derived from this class.
MapView – Provides the canvas onto which the map is drawn.
MapController – Provides an interface for managing an existing map. This class includes capabilities such as setting both the center coordinates of the map and the current zoom level.
ItemizedOverlay – A class specifically designed to overlay information onto a map. For example, an overlay might be used to mark all the locations of the public libraries in a town. A single overlay can contain multiple items, each represented by an OverlayItem instance. An onTap() callback method may be implemented to pop up additional information about a location when tapped by the user.
OverlayItem – Used to represent each item in an ItemizedOverlay. Each item has associated with it a location on the map and an optional image to mark the location.
MyLocationOverlay – A special-purpose overlay designed specifically to display the current location of the device on the map view.
Overlay – A general-purpose overlay class provided primarily to allow transparent effects or content to be placed on top of the map.

You can use the Original documentation from gMaps V1:


  • You need to create you MD5 certificate into your free (thx) Amazon developer account to enable the maps on your app.
  • You will need A REGISTERED KINDLE FIRE TO SEE THE MAP it does not work in other case (also enable the location on settings)
  • getLatitudeSpan() Returns the difference in microdegrees(decimal degrees multiplied by one million). between the latitude of the top edge of the MapView and the latitude of the bottom edge. * 1E6 or / 1E6
  • Useful to replace the typical markers:

Example of extension of Maps to calculate user interactions and refresh for instance the Overlay

package your_package

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;


 * Created by victoriza on 18/07/14.

public class ExplorerAmazonMapView extends MapView {

	private static final String TAG = ExplorerAmazonMapView.class.getSimpleName();

	private static final int DURATION_DEFAULT = 700;

	private OnRegionChangedListener onRegionChangedListener;
	private GeoPoint previousMapCenter;
	private int previousZoomLevel;

	// This is the duration between when the user stops moving the map around and when the onRegionEndChange event fires.
	private int changeDuration;

	private boolean isTouched = false;
	private boolean regionChanging = false;

	private Runnable onRegionEndChangeTask = new Runnable() {
		public void run() {
			regionChanging = false;
			previousMapCenter = getMapCenter();
			previousZoomLevel = getZoomLevel();
			if (onRegionChangedListener != null) {
				onRegionChangedListener.onRegionEndChange(ExplorerAmazonMapView.this, previousMapCenter, previousZoomLevel);

	public ExplorerAmazonMapView(Context context, AttributeSet attrs) {
		super(context, attrs);

	public ExplorerAmazonMapView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);

	public ExplorerAmazonMapView(Context context, String apiKey) {
		super(context, apiKey);

	public boolean onTouchEvent(MotionEvent event) {
		isTouched = event.getAction() != MotionEvent.ACTION_UP;
		return super.onTouchEvent(event);

	public void computeScroll() {

		// If the map region is still changing (user is still scrolling or zooming), reset timer for onRegionEndChange.
		if ((!isTouched && !getMapCenter().equals(previousMapCenter)) || (previousZoomLevel != getZoomLevel())) {

			// If the region has just begun changing, fire off onRegionBeginChange event.
			if (!regionChanging) {
				regionChanging = true;
				if (onRegionChangedListener != null) {
					onRegionChangedListener.onRegionBeginChange(this, previousMapCenter, previousZoomLevel);

			// Reset timer for onRegionEndChange.
			postDelayed(onRegionEndChangeTask, changeDuration);

	private void init() {
		changeDuration = DURATION_DEFAULT;
		previousMapCenter = getMapCenter();
		previousZoomLevel = getZoomLevel();

	public void setOnRegionChangedListener(OnRegionChangedListener listener) {
		onRegionChangedListener = listener;

	public void setChangeDuration(int duration) {
		changeDuration = duration;

	public interface OnRegionChangedListener {
		public abstract void onRegionBeginChange(ExplorerAmazonMapView explorerMapView, GeoPoint geoPoint, int zoomLevel);

		public abstract void onRegionEndChange(ExplorerAmazonMapView explorerMapView, GeoPoint geoPoint, int zoomLevel);

Microsoft Maps API

Yahoo Maps API (discontinued as of Sept 13,2011 in favor of Nokia Maps):
(provided by Vic)

TomTom Map Toolkit API which includes SDKs for Android, iOS and JavaScript
(provided by SoWeLie)

(provided by Adolfo)

(provided by TuxGeek)

OpenStreetMap API

Mobile Maps (powered by Idevio with map data provided by OpenStreetMap)
(provided by Edi)
Nokia Maps


OpenStreetMap Android

(provided by AGrunewald)

(provided by DerekH)
(provided by kiteloop)
(provided by Arman)

(provided by Stot)