Creates a MapView based on this map, adding it to the specified element.
The element to add the map to.
The new MapView contained within the specified element.
Calculates the route from one location to one or more destination locations.
The starting position of the route as some coordinates or a map point.
The destination of the route as some coordinates or a map point. An Iterable
returning multiple instances of these types can be provided instead, which causes the route to terminate at the closest (via the paths) destination.
Optional
options: RouteOptionsOptional route options which can be used to customise the final route.
The route between the specified origin and the (closest) destination.
The routing information is lazily-downloaded the first time this method is called. Once the download is complete, subsequent routes will be calculated instantaneously.
Calculating routes from the same origin with the same options repeatedly has a special optimisation: this allows e.g. finding the distance from the user's location to a list of POIs to perform quite quickly. This optimisation is reset each time the origin or route options changes.
Creates a reactive route that automatically updates when the origin position changes.
The position provider (e.g., user location marker)
The destination coordinates or map point. An Iterable
returning multiple instances of these types can be provided instead, which causes the route to terminate at the closest (via the paths) destination.
Optional
options: RouteOptionsOptional route calculation options
A reactive route instance
A stylised map which can be added to a web page one or more times.
You must call the attach method to actually show an interactive map on a web page.