MPIMapViewInterface

interface MPIMapViewInterface

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

Functions

addInteractivePolygon
Link copied to clipboard
abstract fun addInteractivePolygon(polygon: MPINavigatable.MPIPolygon)
Adds an interactive polygon (allows it to be clickable)
  • Note: usually, polygons with locations attached to them are set to be interactive by default. However, certain polygons might not be. Use this function if you want to set certain polygons to be interactive.

abstract fun addInteractivePolygon(polygonId: String)
Adds an interactive polygon (allows it to be clickable)
clearAllPolygonColors
Link copied to clipboard
abstract fun clearAllPolygonColors(completionCallback: (String?) -> Unit? = null)
Clears color on all polygons
clearJourney
Link copied to clipboard
abstract fun clearJourney()
Remove all paths and connection tooltips on the MPIMapView
createMarker
Link copied to clipboard
abstract fun createMarker(coordinate: MPIMap.MPICoordinate, contentHtml: String, markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String
Creates a marker on a MPINavigatable.
abstract fun createMarker(node: MPINavigatable.MPINode, contentHtml: String, markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String
Creates a marker on a MPINavigatable.MPINode
disableBlueDot
Link copied to clipboard
abstract fun disableBlueDot()
Disables the blue dot so it does not appear on the mapView
drawJourney
Link copied to clipboard
abstract fun drawJourney(directions: MPIDirections, options: MPIOptions.Journey? = null)
Draws a journey on the MPIMapView
drawPath
Link copied to clipboard
abstract fun drawPath(path: List<MPINavigatable.MPINode>, pathOptions: MPIOptions.Path? = null)
Draws a path on the MPIMapView
enableBlueDot
Link copied to clipboard
abstract fun enableBlueDot(options: MPIOptions.BlueDot = MPIOptions.BlueDot())
Enables the blue dot so it will appear if the location is in the venue
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
focusOn
Link copied to clipboard
abstract fun focusOn(focusOptions: MPIOptions.Focus)
Focus on a list of nodes and/or polygons provided in the focus options
getDirections
Link copied to clipboard
abstract fun getDirections(to: MPIDestinationSet, from: MPINavigatable, accessible: Boolean = true, directionsCallback: (List<MPIDirections>?) -> Unit)
abstract fun getDirections(to: MPINavigatable, from: MPINavigatable, accessible: Boolean = true, directionsCallback: (MPIDirections?) -> Unit)
getNearestNodeByScreenCoordinates
Link copied to clipboard
abstract fun getNearestNodeByScreenCoordinates(x: Int, y: Int, map: MPIMap? = null, nearestNodeCallback: (MPINavigatable.MPINode?) -> Unit)
Gets the nearest node by screen coordinates
hashCode
Link copied to clipboard
open fun hashCode(): Int
labelAllLocations
Link copied to clipboard
abstract fun labelAllLocations(options: MPIOptions.FlatLabelAllLocations? = null)
Label all polygons with locations either loaded via the API or passed in
abstract fun labelAllLocations(options: MPIOptions.FloatingLabelAllLocations? = null)
Label all polygons with locations either loaded via the API or passed in
labelPolygon
Link copied to clipboard
abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FlatLabel)
Sets a flat label for MPINavigatable.MPIPolygon
abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FloatingLabel)
Sets a floating label for MPINavigatable.MPIPolygon
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FlatLabel)
Sets a flat label for MPINavigatable.MPIPolygon
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FloatingLabel)
Sets a floating label for MPINavigatable.MPIPolygon
loadVenue
Link copied to clipboard
abstract fun loadVenue(options: MPIOptions.Init, showVenueOptions: MPIOptions.ShowVenue? = null, errorCallback: (MPIError?) -> Unit? = null)
Loads the venue based on the options passed in MPIMapView
  • Note: API calls will be made to retrieve the data

removeAllLabels
Link copied to clipboard
abstract fun removeAllLabels()
Removes all labels
removeAllPaths
Link copied to clipboard
abstract fun removeAllPaths(completionCallback: (String?) -> Unit? = null)
Remove all paths on the MPIMapView
removeMarker
Link copied to clipboard
abstract fun removeMarker(markerId: String)
Removes a marker from a MPINavigatable.MPINode
  • Note: cannot remove a marker id that does not exist yet

setMap
Link copied to clipboard
abstract fun setMap(map: MPIMap, completionCallback: (String?) -> Unit? = null)
Sets the MPIMap of the MPIMapView
abstract fun setMap(mapId: String, completionCallback: (String?) -> Unit? = null)
Sets the MPIMap of the MPIMapView
setPolygonColor
Link copied to clipboard
abstract fun setPolygonColor(polygon: MPINavigatable.MPIPolygon, color: String, textColor: String? = null, opacity: Double = 1.0)
Sets the color of the MPINavigatable.MPIPolygon
abstract fun setPolygonColor(polygonId: String, color: String, textColor: String? = null, opacity: Double = 1.0)
Sets the color of the MPINavigatable.MPIPolygon
showVenue
Link copied to clipboard
abstract fun showVenue(venueResponse: MPIVenueResponse, showVenueOptions: MPIOptions.ShowVenue? = null, errorCallback: (MPIError?) -> Unit? = null)
Shows the venue based on the venue data and options passed in MPIMapView
  • Note: An alternative method to using loadVenue where no API calls will be made; instead, data must be passed in to showVenue which takes in a deserialized MPIVenueResponse

abstract fun showVenue(venueResponse: String, showVenueOptions: MPIOptions.ShowVenue? = null, errorCallback: (MPIError?) -> Unit? = null)
Shows the venue based on the venue data and options passed in MPIMapView
  • Note: An alternative method to using loadVenue where no API calls will be made; instead, data must be passed in to showVenue which takes in a data string

toString
Link copied to clipboard
open fun toString(): String
updatePosition
Link copied to clipboard
abstract fun updatePosition(position: MPIPosition)
Updates the position of the blue dot on the mapView

Inheritors

MPIMapView
Link copied to clipboard