public class MapView
extends com.mapbox.mapboxsdk.maps.MapView
View
for rendering an interactive map within an application.Modifier and Type | Class and Description |
---|---|
static interface |
MapView.OnSizeChangedListener
Interface definition for a callback to be invoked when the size of the displayed map view changes.
|
static interface |
MapView.SurfaceTextureUpdatedListener
Interface definition for updates to the map's SurfaceTexture.
|
Constructor and Description |
---|
MapView(android.content.Context context,
android.util.AttributeSet attrs) |
MapView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
MapView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr,
java.lang.String mapQuestAppKey) |
Modifier and Type | Method and Description |
---|---|
void |
addOnCameraMovedListener(MapboxMap.OnCameraMoveListener listener) |
boolean |
addOnSizeChangedListener(MapView.OnSizeChangedListener listener)
Set the callback that's invoked when the size of the displayed map view changes.
|
void |
invalidate() |
boolean |
isStyleSwitchingBasedOnVisibleRegionEnabled() |
void |
onDestroy() |
protected void |
onSizeChanged(int width,
int height,
int oldw,
int oldh)
Gives us more information on the resize crash present on certain devices
|
boolean |
removeOnSizeChangedListener(MapView.OnSizeChangedListener listener)
Set the callback that's invoked when the size of the displayed map view changes.
|
void |
setNightMode() |
void |
setOnSurfaceTextureUpdatedListener(MapView.SurfaceTextureUpdatedListener surfaceTextureUpdatedListener) |
void |
setPOIOnMapSelectedListener(PoiOnMapListener listener) |
void |
setSatelliteMode() |
void |
setStreetMode() |
void |
setStyleByType(MapStyles.Type styleType) |
void |
setStyles(MapStyles styles)
Sets the current style mapping (mapbox style url pairs for street, night and satellite modes).
|
void |
setStyleSwitchingBasedOnRegionEnabled(boolean doEnable) |
void |
setStyleUrl(java.lang.String url) |
public MapView(android.content.Context context, android.util.AttributeSet attrs)
public MapView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
public MapView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, java.lang.String mapQuestAppKey)
protected void onSizeChanged(int width, int height, int oldw, int oldh)
public void onDestroy()
public boolean addOnSizeChangedListener(MapView.OnSizeChangedListener listener)
listener
- The OnSizeChangedListener to add.public boolean removeOnSizeChangedListener(MapView.OnSizeChangedListener listener)
listener
- The OnSizeChangedListener to remove.public void setOnSurfaceTextureUpdatedListener(MapView.SurfaceTextureUpdatedListener surfaceTextureUpdatedListener)
public void setStyles(MapStyles styles)
public boolean isStyleSwitchingBasedOnVisibleRegionEnabled()
public void setStyleSwitchingBasedOnRegionEnabled(boolean doEnable)
public void setStreetMode()
public void setNightMode()
public void setSatelliteMode()
public void setStyleByType(MapStyles.Type styleType)
public void invalidate()
public void setPOIOnMapSelectedListener(PoiOnMapListener listener)
public void addOnCameraMovedListener(MapboxMap.OnCameraMoveListener listener)
public void setStyleUrl(java.lang.String url)