addAndRouteToCustomPoi

abstract fun addAndRouteToCustomPoi(@NonNull name: String, @NonNull location: MercatorZone, @Nullable callback: MapApi.CustomPoi.CustomPoiCallback)

Create a custom POI at the supplied indoor location (property/building/floor + mercator coordinates), drop a pin for it on the map, add it as the routing destination, and compute + draw a route to it from the user's current location.

This is a headless call — no prebuilt UI is required. The POI is plotted via the map pin, the route is computed by requestRoute, and, on success, drawn via switchRoute. To also enter turn-by-turn navigation, the caller can pass the returned Route to startNavigation.

Parameters

name

display name of the custom POI (used as the waypoint name)

location

the POI location; propertyId must be a currently downloaded/plotted property

callback

delivered on the main thread; may be null


abstract fun addAndRouteToCustomPoi(@NonNull name: String, latitude: Double, longitude: Double, propertyId: Int, buildingId: Int, floorId: Int, @Nullable callback: MapApi.CustomPoi.CustomPoiCallback)

Create a custom POI at the supplied WGS84 geographic coordinate. The lat/lng is projected to mercator via com.mapsted.positioning.core.utils.calcs.MapCalc and stamped with the supplied property/building/floor so the routing engine can snap it into the venue graph. Otherwise identical to addAndRouteToCustomPoi.

Parameters

name

display name of the custom POI

latitude

WGS84 latitude

longitude

WGS84 longitude

propertyId

the property the POI belongs to (must be plotted)

buildingId

the building the POI belongs to, or -1 for outdoor

floorId

the floor the POI belongs to, or -1 for outdoor

callback

delivered on the main thread; may be null