Class MapView

com.yandex.mapkit.mapview

java.lang.Object ⇽ MapView

public class MapView

MapView can be customized by using the yandex:movable XML attribute.

If yandex:movable="true" then PlatformGLTextureView will be used for rendering and MapView can be used, for example, in a ListView. If yandex:movable="false" or is not set, PlatfromGLSurfaceView will be used for rendering and MapView should not be used in a ListView or a GridView. If yandex:movable="false" then this MapView can't overlap with any other MapView (either movable or not).

Constructors

MapView(Context context)
MapView(Context context, AttributeSet attrs)
MapView(Context context, AttributeSet attrs, int defStyle)

Methods

void addSizeChangedListener( SizeChangedListener listener)
double getFieldOfViewY()
ScreenRect getFocusRect()
VisibleRegion getFocusRegion()
Map getMap()
MapWindow getMapWindow()
PointOfView getPointOfView()
float getScaleFactor()
Bitmap getScreenshot()

Captures the screenshot with the currently displayed map.

ScreenPoint getZoomFocusPoint()
ZoomFocusPointMode getZoomFocusPointMode()
int height()
boolean isValid()
void onStart()

Should be called from from corresponding method of activity or fragment containing this view.

void onStop()

Should be called from from corresponding method of activity or fragment containing this view.

void removeSizeChangedListener( SizeChangedListener listener)
Point screenToWorld( ScreenPoint screenPoint)
void setFieldOfViewY(double fovY)
void setFocusRect( ScreenRect rect)
void setMaxFps(float fps)
void setNoninteractive(boolean is)
void setPointOfView( PointOfView pointOfView)
void setScaleFactor(float scaleFactor)
void setZoomFocusPoint( ScreenPoint zoomFocusPoint)
void setZoomFocusPointMode( ZoomFocusPointMode zoomFocusPoint)
void startPerformanceMetricsCapture()
String stopPerformanceMetricsCapture()
int width()
ScreenPoint worldToScreen( Point worldPoint)

Constructor Detail

MapView

public MapView (Context context)

MapView

public MapView (Context context, AttributeSet attrs)

MapView

public MapView (Context context, AttributeSet attrs, int defStyle)

Method Detail

addSizeChangedListener

public void addSizeChangedListener (SizeChangedListener listener)

getFieldOfViewY

public double getFieldOfViewY ()

getFocusRect

public ScreenRect getFocusRect ()

getFocusRegion

public VisibleRegion getFocusRegion ()

getMap

public Map getMap ()

getMapWindow

public MapWindow getMapWindow ()

getPointOfView

public PointOfView getPointOfView ()

getScaleFactor

public float getScaleFactor ()

getScreenshot

public Bitmap getScreenshot ()

Captures the screenshot with the currently displayed map.

getZoomFocusPoint

public ScreenPoint getZoomFocusPoint ()

getZoomFocusPointMode

public ZoomFocusPointMode getZoomFocusPointMode ()

height

public int height ()

isValid

public boolean isValid ()

onStart

public void onStart ()

Should be called from from corresponding method of activity or fragment containing this view.

onStop

public void onStop ()

Should be called from from corresponding method of activity or fragment containing this view.

removeSizeChangedListener

public void removeSizeChangedListener (SizeChangedListener listener)

screenToWorld

public Point screenToWorld (ScreenPoint screenPoint)

setFieldOfViewY

public void setFieldOfViewY (double fovY)

setFocusRect

public void setFocusRect (ScreenRect rect)

setMaxFps

public void setMaxFps (float fps)

setNoninteractive

public void setNoninteractive (boolean is)

setPointOfView

public void setPointOfView (PointOfView pointOfView)

setScaleFactor

public void setScaleFactor (float scaleFactor)

setZoomFocusPoint

public void setZoomFocusPoint (ScreenPoint zoomFocusPoint)

setZoomFocusPointMode

public void setZoomFocusPointMode (ZoomFocusPointMode zoomFocusPoint)

startPerformanceMetricsCapture

public void startPerformanceMetricsCapture ()

stopPerformanceMetricsCapture

public String stopPerformanceMetricsCapture ()

width

public int width ()

worldToScreen

public ScreenPoint worldToScreen (Point worldPoint)