MapControl

class MapControl

Functions

Link copied to clipboard
open fun addOnCameraEventListener(@NonNull onCameraEventListener: MPCameraEventListener)
Add a camera event listener, invoked when a camera event occurs (e.g.
Link copied to clipboard
open fun addOnFloorUpdateListener(onFloorUpdateListener: OnFloorUpdateListener)
Set up a listener object to catch floor changes made by either the user or the positioning service
Link copied to clipboard
open fun clearFilter()
Invoke this method to restore the map to its default state (POIs shown based on their display rules, etc.
Link copied to clipboard
open fun create(@NonNull mapConfig: MPIMapConfig, @NonNull onMapControlReadyListener: OnMapControlReadyListener)
Create a new MapControl instance.
Link copied to clipboard
open fun deSelectLocation()
Call this to deselect a location previously selected with selectLocation
Link copied to clipboard
open fun disableLiveData(domainType: String)
Disables live data on a specific domainType
Link copied to clipboard
open fun enableLiveData(domainType: String)
Enables live data on a specific domain and uses MapsIndoors standard graphic implementation
open fun enableLiveData(domainType: String, onLiveLocationUpdateListener: OnLiveLocationUpdateListener)
Enables live data on a specific domain
Link copied to clipboard
open fun getCurrentBuilding(): MPBuilding
Get the currently selected building
Link copied to clipboard
open fun getCurrentBuildingFloor(): MPFloor
Returns the current MPFloor of the current MPBuilding in focus
Link copied to clipboard
open fun getCurrentFloorIndex(): Int
Returns the current selected floor index
Link copied to clipboard
open fun getCurrentMapsIndoorsZoom(): Double
Get the zoom level that MapsIndoors is currently using for display icons etc.
Link copied to clipboard
open fun getCurrentVenue(): MPVenue
Get the currently selected venue
Link copied to clipboard
open fun getFloorSelector(): MPFloorSelectorInterface
Get the floor selector control object.
Link copied to clipboard
open fun getLocation(marker: MPIMarker): MPLocation
Get a MPLocation by marker reference.
Link copied to clipboard
open fun getMapStyle(): MPMapStyle
Gets the current map style of MapsIndoors tiles
Link copied to clipboard
open fun getMapViewPaddingBottom(): Int
Gets the Map View bottom padding
Link copied to clipboard
open fun getMapViewPaddingEnd(): Int
Gets the Map View right padding
Link copied to clipboard
open fun getMapViewPaddingStart(): Int
Gets the Map View left padding
Link copied to clipboard
open fun getMapViewPaddingTop(): Int
Gets the Map View top padding
Link copied to clipboard
open fun goTo(@Nullable entity: MPEntity)
Focus the map on the given MPEntity.
Link copied to clipboard
open fun hideFloorSelector(hide: Boolean)
Shows or hides the MPFloorSelectorInterface, i.e.
Link copied to clipboard
open fun isFloorSelectorHidden(): Boolean
Returns the current state of the current MPFloorSelectorInterface.
Link copied to clipboard
open fun isUserPositionShown(): Boolean
Returns the current visibility state of the user location icon (blue dot)
Link copied to clipboard
open fun onDestroy()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onLowMemory()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onPause()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onRestoreInstanceState(savedInstanceState: Bundle)
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onResume()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onSaveInstanceState(outState: Bundle)
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onStart()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun onStop()
Call this method from the parent Activity/Fragment's corresponding method.
Link copied to clipboard
open fun removeOnCameraEventListener(@NonNull onCameraEventListener: MPCameraEventListener)
Remove a camera event listener
Link copied to clipboard
open fun removeOnFloorUpdateListener(onFloorUpdateListener: OnFloorUpdateListener)
Remove a floor update listener
Link copied to clipboard
open fun selectBuilding(@NonNull building: MPBuilding, moveCamera: Boolean)
Select a building, optionally move the camera to the given building
Link copied to clipboard
open fun selectFloor(floorIndex: Int)
Sets the current visible floor to the given z-index one For floor names/z-index pairs check the value returned by getFloorHashMap
Link copied to clipboard
open fun selectLocation(@Nullable location: MPLocation, behavior: MPSelectionBehavior)
Selects a location based on a MPLocation object.
open fun selectLocation(locationId: String, behavior: MPSelectionBehavior)
Selects a location.
Link copied to clipboard
open fun selectVenue(@NonNull venue: MPVenue, moveCamera: Boolean)
Select a venue, optionally move the camera to the given venue
Link copied to clipboard
open fun setClusterIconAdapter(locationClusterImageAdapter: MPClusterIconAdapter)
Sets the given MPClusterIconAdapter handler
Link copied to clipboard
open fun setFilter(@NonNull locations: List<MPLocation>, @NonNull behavior: MPFilterBehavior): Boolean
open fun setFilter(    @NonNull filter: MPFilter,     @NonNull behavior: MPFilterBehavior,     @Nullable successListener: MPSuccessListener)
Use this method to display temporary locations, not points of interests location.
Link copied to clipboard
open fun setFloorSelector(floorSelector: MPFloorSelectorInterface)
Replaces the embedded FloorSelector with the given custom one.
Link copied to clipboard
open fun setInfoWindowAdapter(adapter: IInfoWindowAdapter)
A convenience wrapper
Link copied to clipboard
open fun setMapPadding(    start: Int,     top: Int,     end: Int,     bottom: Int)
Sets padding on the map.
Link copied to clipboard
open fun setMapStyle(mapStyle: MPMapStyle)
Sets the map style for MapsIndoors tiles
Link copied to clipboard
open fun setOnCurrentBuildingChangedListener(onBuildingFoundAtCameraTargetListener: OnBuildingFoundAtCameraTargetListener)
Receive notifications when the current building changes
Link copied to clipboard
open fun setOnCurrentVenueChangedListener(@Nullable onVenueFoundAtCameraTargetListener: OnVenueFoundAtCameraTargetListener)
Receive notifications when the map camera target enters a MPVenue (its boundaries)
Link copied to clipboard
open fun setOnLocationClusterClickListener(onLocationClusterClickListener: OnLocationClusterClickListener)
Sets the given OnLocationClusterClickListener handler
Link copied to clipboard
open fun setOnLocationSelectedListener(onLocationSelectedListener: OnLocationSelectedListener)
Sets a listener for when a location gets selected (programmatically or user-triggered)
Link copied to clipboard
open fun setOnMapClickListener(onMapClickListener: MPOnMapClickListener)
Set the map click listener.
Link copied to clipboard
open fun setOnMarkerClickListener(onMarkerClickListener: MPOnMarkerClickListener)
Set the marker click listener.
Link copied to clipboard
open fun setOnMarkerInfoWindowClickListener(onInfoWindowClickListener: MPOnInfoWindowClickListener)
Set the marker info window click listener.
Link copied to clipboard
open fun setOnMarkerInfoWindowCloseListener(onMarkerInfoWindowCloseListener: MPOnInfoWindowClickListener)
Set the marker info window click listener.
Link copied to clipboard
open fun setOnWillUpdateLocationsOnMap(listener: OnWillUpdateLocationsOnMap)
Link copied to clipboard
open fun showInfoWindowOnClickedLocation(show: Boolean)
Enables/disables the info window on user-selected locations The info window is shown by default when the user selects a location (by tapping on it)
Link copied to clipboard
open fun showUserPosition(show: Boolean)
Renders the icon set with updateDisplayRule at the last known user position on the map