public class

MapView

extends View
java.lang.Object
   ↳ com.neomades.ui.View
     ↳ com.neomades.maps.MapView

Class Overview

A View which displays a map (with data obtained from the native Maps service). When focused, it will capture keypresses and touch gestures to move the map.

This view displays map information and allows manipulating the map contents from your application.

Important

Use only one MapView per application. Do not hesitate reusing single MapView instance between different screens (by detaching view from parent).

Note: You are advised not to add children to this view.

Summary

[Expand]
Inherited XML Attributes
From class com.neomades.ui.View
[Expand]
Inherited Constants
From interface com.neomades.ui.Alignment
From interface com.neomades.ui.StretchMode
Public Constructors
MapView()
Creates a MapView with default map provider.
MapView(MapProvider provider)
Creates a MapView with the specified provider given in parameter.
Public Methods
Map getMap()
Returns the map instance behind this MapView.
[Expand]
Inherited Methods
From class com.neomades.ui.View
From class java.lang.Object

Public Constructors

public MapView ()

Creates a MapView with default map provider.

Cross Platform Considerations

In Android, the MapView can be created only if the Google Play services are available on the device. Checks they are available before using MapView with showErrorDialogIfUnavailable() or isAvailable(). If not, an IllegalStateException will be thrown.

public MapView (MapProvider provider)

Creates a MapView with the specified provider given in parameter. The provider cannot be null.

Parameters
provider the map provider to use
Throws
NullPointerException if the provider is null

Public Methods

public Map getMap ()

Returns the map instance behind this MapView.

Returns