MPIMapViewInterface

interface MPIMapViewInterface

This class contains methods that help to display and interact with a Mappedin venue

Functions

Link copied to clipboard
abstract fun addInteractivePolygon(polygon: MPINavigatable.MPIPolygon)
abstract fun addInteractivePolygon(polygonId: String)

Adds an interactive polygon (allows it to be clickable)

Link copied to clipboard
abstract fun changeLanguage(languageCode: String, cache: Boolean = false)

Changes the language of the venue. This will trigger a re-fetch of the venue data.

Link copied to clipboard
abstract suspend fun clearAllPolygonColors()
abstract fun clearAllPolygonColors(completionCallback: (MPIError?) -> Unit?)

Clears color on all polygons

Link copied to clipboard
abstract fun createCustomTooltip(    coordinate: MPIMap.MPICoordinate,     contentHtml: String,     selector: String,     tooltipOptions: MPIOptions.Tooltip = MPIOptions.Tooltip(),     callback: (id: String?) -> Unit? = null)
abstract fun createCustomTooltip(    node: MPINavigatable.MPINode,     contentHtml: String,     selector: String,     tooltipOptions: MPIOptions.Tooltip = MPIOptions.Tooltip(),     callback: (id: String?) -> Unit? = null)
Link copied to clipboard
abstract fun createMarker(    coordinate: MPIMap.MPICoordinate,     contentHtml: String,     markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String

Creates a marker on a MPINavigatable.MPICoordinate Deprecated: Use MPIMarkerManager.add instead.

abstract fun createMarker(    node: MPINavigatable.MPINode,     contentHtml: String,     markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String

Creates a marker on a MPINavigatable.MPINode Deprecated: Use MPIMarkerManager.add instead.

Link copied to clipboard
abstract fun createTooltip(    coordinate: MPIMap.MPICoordinate,     contentHtml: String,     tooltipOptions: MPIOptions.Tooltip = MPIOptions.Tooltip(),     callback: (id: String?) -> Unit? = null)
abstract fun createTooltip(    node: MPINavigatable.MPINode,     contentHtml: String,     tooltipOptions: MPIOptions.Tooltip = MPIOptions.Tooltip(),     callback: (id: String?) -> Unit? = null)
Link copied to clipboard
abstract fun drawPath(path: List<MPINavigatable.MPINode>, pathOptions: MPIOptions.Path? = null)

Draws a path on the MPIMapView Deprecated: Use MPIPathManager.addPath instead.

Link copied to clipboard
abstract fun enableImageFlippingForPolygon(polygon: MPINavigatable.MPIPolygon)

Enables image flipping for a polygon

Link copied to clipboard
abstract suspend fun getCurrentLanguage(): MPILanguage
abstract fun getCurrentLanguage(languageCallback: (MPILanguage?) -> Unit)

Returns the current language of the venue.

Link copied to clipboard
abstract suspend fun getDirections(    to: MPIDestinationSet,     from: MPINavigatable,     accessible: Boolean = false): List<MPIDirections>
abstract fun getDirections(    to: MPIDestinationSet,     from: MPINavigatable,     accessible: Boolean = false,     directionsCallback: (List<MPIDirections>?) -> Unit)
abstract suspend fun getDirections(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = false): MPIDirections
abstract fun getDirections(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = false,     directionsCallback: (MPIDirections?) -> Unit)
Link copied to clipboard
abstract suspend fun getDistance(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = false): Float
abstract fun getDistance(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = false,     distanceCallback: (Float?) -> Unit)
Link copied to clipboard
abstract fun getMappedinCoordinateAtScreenCoordinate(    x: Int,     y: Int,     map: MPIMap,     callback: (MPIMap.MPICoordinate?) -> Unit)

Get the MPIMap.MPICoordinate using a MapView's screen x and y coordinate. The coordinate is relative to the top left corner of the map view. The top left corner of the MapView is (0, 0). The bottom right corner is MapView.width and MapView.height.

Link copied to clipboard
abstract suspend fun getNearestNodeByScreenCoordinates(    x: Int,     y: Int,     map: MPIMap? = null): MPINavigatable.MPINode
abstract fun getNearestNodeByScreenCoordinates(    x: Int,     y: Int,     map: MPIMap? = null,     nearestNodeCallback: (MPINavigatable.MPINode?) -> Unit)

Gets the nearest node by screen coordinates

Link copied to clipboard
abstract fun getPolygonsAtCoordinate(    coord: MPIMap.MPICoordinate,     options: MPIOptions.GetPolygonsAtCoordinate? = null,     polygonsCallback: (List<MPINavigatable.MPIPolygon>?) -> Unit)

Gets a list of polygons by map coordinates

Link copied to clipboard
abstract fun getPolygonsAtScreenCoordinate(    x: Int,     y: Int,     options: MPIOptions.GetPolygonsAtCoordinate? = null,     polygonsCallback: (List<MPINavigatable.MPIPolygon>?) -> Unit)

Gets a list of polygons by screen coordinates

Link copied to clipboard
abstract fun labelAllLocations(options: MPIOptions.FlatLabelAllLocations? = null)
abstract fun labelAllLocations(options: MPIOptions.FloatingLabelAllLocations? = null)

Label all polygons with locations either loaded via the API or passed in

Link copied to clipboard
abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FlatLabel)
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FlatLabel)

Sets a flat label for MPINavigatable.MPIPolygon

abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FloatingLabel)
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FloatingLabel)

Sets a floating label for MPINavigatable.MPIPolygon

Link copied to clipboard
abstract fun loadVenue(    options: MPIOptions.Init,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)

Loads the venue based on the options passed in MPIMapView

Link copied to clipboard
abstract suspend fun removeAllPaths()
abstract fun removeAllPaths(completionCallback: (MPIError?) -> Unit?)

Remove all paths on the MPIMapView Deprecated: Use MPIPathManager.removeAllPaths instead.")

Link copied to clipboard
abstract fun removeMarker(markerId: String)

Removes a marker from a MPINavigatable.MPINode Deprecated: Use MPIMarkerManager.remove instead.

Link copied to clipboard
abstract fun removeTooltip(id: String)
Link copied to clipboard
abstract fun setAmbientOcclusionConfiguration(ambientOcclusionConfiguration: MPIOptions.AmbientOcclusionConfiguration)

Sets the ambient occlusion configuration.

Link copied to clipboard
abstract fun setAntialiasConfiguration(antialiasConfiguration: MPIOptions.AntialiasConfiguration)

Sets the anti aliasing configuration.

Link copied to clipboard
abstract suspend fun setMap(map: MPIMap)
abstract suspend fun setMap(mapId: String)
abstract fun setMap(map: MPIMap, completionCallback: (MPIError?) -> Unit?)
abstract fun setMap(mapId: String, completionCallback: (MPIError?) -> Unit?)

Sets the MPIMap of the MPIMapView

Link copied to clipboard
abstract fun setPolygonColor(polygon: MPINavigatable.MPIPolygon, color: String)

Sets the color of the MPINavigatable.MPIPolygon

Link copied to clipboard
abstract fun showVenue(    venueResponse: MPIVenueResponse,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)
abstract fun showVenue(    venueResponse: String,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)

Shows the venue based on the venue data and options passed in MPIMapView

Inheritors

Link copied to clipboard