Interface MapKit

com.yandex.mapkit

public interface MapKit

Provides access to all services in the SDK.

Initialize the MapKit factory before using this class.

Note: MapKit holds listener/delegate objects by weak references. You need to have strong references to them somewhere in the client code.

Methods

DrivingRouter createDrivingRouter()

Creates a manager that builds driving routes using the specified endpoints and other route parameters.

LocationManager createLocationManager()

Creates a manager that allows to listen for device location updates.

LocationSimulator createLocationSimulator( Polyline geometry)

Creates a suspended LocationSimulator object with the given geometry.

MapWindow createMapWindow(PlatformGLView platformView)

Creates an internal "window" object that is used to show the map.

MasstransitRouter createMasstransitRouter()

Creates a manager that builds public transit routes using the origin and destination points.

Player createPanoramaPlayer(PlatformGLView platformView)

Creates an internal "window" object needed to show the panorama viewer.

PanoramaService createPanoramaService()

Creates a service that allows to find a panorama closest to the chosen point.

PedestrianRouter createPedestrianRouter()

Creates a manager that builds pedestrian routes using the origin and destination points.

SearchManager createSearchManager( SearchManagerType searchManagerType)

Creates a manager that allows to search for various geographical objects using a variety of parameters.

OfflineCacheManager getOfflineCacheManager()
String getVersion()

Returns the version of the mapkit bundle.

boolean isValid()

Tells if this MapKit is valid or no.

void onStart()

Notifies MapKit when the application resumes the foreground state.

void onStop()

Notifies MapKit when the application pauses and goes to the background.

DrivingRouter createDrivingRouter()

Creates a manager that builds driving routes using the specified endpoints and other route parameters.

LocationManager createLocationManager()

Creates a manager that allows to listen for device location updates.

LocationSimulator createLocationSimulator( Polyline geometry)

Creates a suspended LocationSimulator object with the given geometry.

MapWindow createMapWindow(PlatformGLView platformView)

Creates an internal "window" object that is used to show the map.

MasstransitRouter createMasstransitRouter()

Creates a manager that builds public transit routes using the origin and destination points.

Player createPanoramaPlayer(PlatformGLView platformView)

Creates an internal "window" object needed to show the panorama viewer.

PanoramaService createPanoramaService()

Creates a service that allows to find a panorama closest to the chosen point.

PedestrianRouter createPedestrianRouter()

Creates a manager that builds pedestrian routes using the origin and destination points.

SearchManager createSearchManager( SearchManagerType searchManagerType)

Creates a manager that allows to search for various geographical objects using a variety of parameters.

OfflineCacheManager getOfflineCacheManager()
String getVersion()

Returns the version of the mapkit bundle.

boolean isValid()

Tells if this MapKit is valid or no.

void onStart()

Notifies MapKit when the application resumes the foreground state.

void onStop()

Notifies MapKit when the application pauses and goes to the background.

Method Detail

createDrivingRouter

public DrivingRouter createDrivingRouter ()

Creates a manager that builds driving routes using the specified endpoints and other route parameters.

createLocationManager

public LocationManager createLocationManager ()

Creates a manager that allows to listen for device location updates.

createLocationSimulator

public LocationSimulator createLocationSimulator (Polyline geometry)

Creates a suspended LocationSimulator object with the given geometry.

createMapWindow

public MapWindow createMapWindow (PlatformGLView platformView)

Creates an internal "window" object that is used to show the map.

Do not call this method - it is for internal use only. To show the map, please use the corresponding map "view" object.

createMasstransitRouter

public MasstransitRouter createMasstransitRouter ()

Creates a manager that builds public transit routes using the origin and destination points.

createPanoramaPlayer

public Player createPanoramaPlayer (PlatformGLView platformView)

Creates an internal "window" object needed to show the panorama viewer.

Do not call this method - it is for internal use only. To open the panorama viewer, please use the corresponding panorama "view" object.

createPanoramaService

public PanoramaService createPanoramaService ()

Creates a service that allows to find a panorama closest to the chosen point.

createPedestrianRouter

public PedestrianRouter createPedestrianRouter ()

Creates a manager that builds pedestrian routes using the origin and destination points.

createSearchManager

public SearchManager createSearchManager (SearchManagerType searchManagerType)

Creates a manager that allows to search for various geographical objects using a variety of parameters.

getOfflineCacheManager

public OfflineCacheManager getOfflineCacheManager ()

Attention.

This feature is not available in the free MapKit version.

Returns a manager that handles cached resources offline.

getVersion

public String getVersion ()

Returns the version of the mapkit bundle.

isValid

public boolean isValid ()

Tells if this MapKit is valid or no.

Any other method (except for this one) called on an invalid MapKit will throw java.lang.RuntimeException. An instance becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.

onStart

public void onStart ()

Notifies MapKit when the application resumes the foreground state.

onStop

public void onStop ()

Notifies MapKit when the application pauses and goes to the background.