Directions Renderer
iOS V4
Task {
try await MPMapsIndoors.shared.load(apiKey: #INSERT_API_KEY)
mapControl = MPMapsIndoors.createMapControl(mapConfig: #INSERT_YOUR_MAPCONFIG)
let origin = MPMapsIndoors.shared.locationWith(locationId: "a6be6af53db44c1e8cc7fe4f")
let destination = MPMapsIndoors.shared.locationWith(locationId: "0c44207987174561a53fb00a")
let directionsQuery = MPDirectionsQuery(origin: origin!, destination: destination!)
let directionsService = MPMapsIndoors.shared.directionsService
let route = try? await directionsService.routingWith(query: directionsQuery)
let renderer = mapControl?.newDirectionsRenderer()
renderer?.fitBounds = true
renderer?.route = route
renderer?.animate(duration: 5)
}Controlling the Visible Segments on the Directions Renderer
Reacting to Label Tapping
Show Content of Nearby Locations
Last updated
Was this helpful?