Wrld.map.routes
Methods
map.routes.getRoute(viaPoints, onLoadHandler, onErrorHandler, transportMode)
var _onRoutesLoaded = function(routes) {
// ... use the returned route options
};
var _onRoutesError = function(err) {
console.log(err);
};
// Get routes between the two provided points
map.routes.getRoute(
[
[-2.9786788,56.4602727, 2], // start point (indoors on 2nd level)
[-2.9783117,56.4600344], // end point (outside)
],
_onRoutesLoaded,
_onRoutesError,
"walking"
);
Get route options between the supplied indoor and/or outdoor points asynchronously, returning the results to the provided callback.
Argument | Type | Description |
---|---|---|
viaPoints | [lon, lat, <level>] | An array of [lon, lat] pairs specifying the coordinates the route should pass through, in the order they should be visited. A level can optionally be specified to indicate an indoor waypoint. This level parameter should match the level index of the indoor map floor that contains the waypoint. |
onLoadHandler | callback | A callback taking an array of returned routes, as arrays of [lon, lat]. This is only called if no errors occurred. |
onErrorHandler | callback | An optional callback taking some error JSON. This is only called if no routes could be acquired. |
transportMode | string | An optional desired mode of travel for this route. Currently supported: “walking”. Defaults to “walking” if not provided. Note: “driving” routes are available for limited areas. Please contact support@wrld3d.com for details. |
v1.1.0
- Wrld.map
- Wrld.map.indoors
- Wrld.map.themes
- Wrld.map.routes
- Wrld.map.buildings
- Wrld.map.props
- Wrld.map.indoorMapEntities
- Wrld.map.indoorMapFloorOutlines
- Wrld.Prop
- Wrld.indoorMapEntities .IndoorMapEntityInformation
- Wrld.indoorMapEntities.IndoorMapEntity
- Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlineInformation
- Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlinePolygon
- Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlinePolygonRing
- Wrld.themes
- Wrld.Marker
- Wrld.Popup
- Wrld.Circle
- Wrld.Polygon
- Wrld.Polyline
- Wrld.Rectangle
- Wrld.native.Polygon
- Wrld.native.Polyline
- Wrld.Heatmap
- Wrld.buildings.BuildingHighlight
- Wrld.buildings.BuildingHighlightOptions
- Wrld.buildings.BuildingInformation
- Wrld.buildings.BuildingDimensions
- Wrld.buildings.BuildingContour
- Event objects
- WrldIndoorControl
- WrldMarkerController
- WrldSearchbar
- WrldNavigation
- WrldRouteView
- WrldIndoorPolygonEditor
- WrldPoiApi
- L.Map
- L.Marker
- L.Popup
- L.Tooltip
- L.TileLayer
- L.TileLayer.WMS
- L.ImageOverlay
- L.Path
- L.Polyline
- L.Polygon
- L.Rectangle
- L.Circle
- L.CircleMarker
- L.SVG
- L.Canvas
- L.LayerGroup
- L.FeatureGroup
- L.GeoJSON
- L.GridLayer
- L.LatLng
- L.LatLngBounds
- L.Point
- L.Bounds
- L.Icon
- L.DivIcon
- L.Control.Zoom
- L.Control.Attribution
- L.Control.Layers
- L.Control.Scale
- L.Browser
- L.Util
- L.Transformation
- L.LineUtil
- L.PolyUtil
- L.DomEvent
- L.DomUtil
- L.PosAnimation
- L.Draggable
- L.Class
- L.Evented
- L.Layer
- Interactive layer
- L.Control
- L.Handler
- L.Projection
- L.CRS
- L.Renderer
- Event objects
- L.DivOverlay
- Global Switches
- L.noConflict
- L.version
Map
Props
Indoor Map Entities
Indoor Map Floor Outlines
Themes
UI Layers
Vector Layers
Heatmaps
Buildings
Events
Widgets (Optional)
Services (Optional)
Leaflet
Map
Wrld.map
Wrld.map.indoors
Wrld.map.themes
Wrld.map.routes
Wrld.map.buildings
Wrld.map.props
Wrld.map.indoorMapEntities
Wrld.map.indoorMapFloorOutlines
Props
Wrld.Prop
Indoor Map Entities
Wrld.indoorMapEntities .IndoorMapEntityInformation
Wrld.indoorMapEntities.IndoorMapEntity
Indoor Map Floor Outlines
Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlineInformation
Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlinePolygon
Wrld.indoorMapFloorOutlines .IndoorMapFloorOutlinePolygonRing
Themes
Wrld.themes
UI Layers
Wrld.Marker
Wrld.Popup
Vector Layers
Wrld.Circle
Wrld.Polygon
Wrld.Polyline
Wrld.Rectangle
Wrld.native.Polygon
Wrld.native.Polyline
Heatmaps
Wrld.Heatmap
Buildings
Wrld.buildings.BuildingHighlight
Wrld.buildings.BuildingHighlightOptions
Wrld.buildings.BuildingInformation
Wrld.buildings.BuildingDimensions
Wrld.buildings.BuildingContour
Events
Event objects
Widgets (Optional)
WrldIndoorControl
WrldMarkerController
WrldSearchbar
WrldNavigation
WrldRouteView
WrldIndoorPolygonEditor
Services (Optional)
WrldPoiApi
Leaflet
L.Map
L.Marker
L.Popup
L.Tooltip
L.TileLayer
L.TileLayer.WMS
L.ImageOverlay
L.Path
L.Polyline
L.Polygon
L.Rectangle
L.Circle
L.CircleMarker
L.SVG
L.Canvas
L.LayerGroup
L.FeatureGroup
L.GeoJSON
L.GridLayer
L.LatLng
L.LatLngBounds
L.Point
L.Bounds
L.Icon
L.DivIcon
L.Control.Zoom
L.Control.Attribution
L.Control.Layers
L.Control.Scale
L.Browser
L.Util
L.Transformation
L.LineUtil
L.PolyUtil
L.DomEvent
L.DomUtil
L.PosAnimation
L.Draggable
L.Class
L.Evented
L.Layer
Interactive layer
L.Control
L.Handler
L.Projection
L.CRS
L.Renderer
Event objects
L.DivOverlay
Global Switches
L.noConflict
L.version