L.polyline(latLng, options)
wrld.js requires that users create instances of L.polyline
via the standard Leaflet factory (see creation example below).
// Create a polyline in downtown San Francisco.
var polylinePoints = [
[37.781814, -122.404740],
[37.781719, -122.404637],
[37.781489, -122.404949],
[37.780704, -122.403945],
[37.780012, -122.404827]
];
var polyline = L.polyline(polylinePoints).addTo(map);
Argument | Type | Description |
---|---|---|
latlngs | L.LatLng[] | latlngs forming the polyline. |
options | object | Accepts all of the options to L.polyline , plus additional wrld.js entries. |
Options
Options | Type | Default | Description |
---|---|---|---|
elevation | number | 0.0 | Altitude above ground or sea level in meters. |
elevationMode | string | ‘heightAboveGround’ | Whether altitude is measured above ground level (“heightAboveGround”) or sea level (“heightAboveSeaLevel”). |
indoorMapId | string | ’’ | The id of the indoor map with which the Polyline will be associated. |
indoorMapFloorId | number | 0 | The id of the indoor map floor with which the Polyline will be associated. |
Methods
getElevation()
Returns the elevation in meters.
setElevation(elevation)
Set the elevation in meters.
Argument | Type | Description |
---|---|---|
elevation | number | The elevation in meters |
v0.1.1335
- L.Wrld.themes
- Event objects
- WrldPoiApi
- L.Map
- L.Marker
- L.Popup
- L.TileLayer
- L.TileLayer.WMS
- L.TileLayer.Canvas
- L.ImageOverlay
- L.Path
- L.Polyline
- L.MultiPolyline
- L.Polygon
- L.MultiPolygon
- L.Rectangle
- L.Circle
- L.CircleMarker
- L.LayerGroup
- L.FeatureGroup
- L.GeoJson
- L.LatLng
- L.LatLngBounds
- L.Point
- L.Bounds
- L.Icon
- L.DivIcon
- L.Control
- L.Control.zoom
- L.Control.Attribution
- L.Control.Layers
- L.Control.Scale
- Events methods
- Event objects
- L.Class
- L.Browser
- L.Util
- L.Transformation
- L.LineUtil
- L.PolyUtil
- L.DomEvent
- L.DomUtil
- L.PosAnimation
- L.Draggable
- L.IHandler
- L.ILayer
- L.IControl
- L.IProjection
- L.ICRS
- Global Switches
- L.noConflict
- L.version
Themes
Events
Services (Optional)
Leaflet
Themes
L.Wrld.themes
Events
Event objects
Services (Optional)
WrldPoiApi
Leaflet
L.Map
L.Marker
L.Popup
L.TileLayer
L.TileLayer.WMS
L.TileLayer.Canvas
L.ImageOverlay
L.Path
L.Polyline
L.MultiPolyline
L.Polygon
L.MultiPolygon
L.Rectangle
L.Circle
L.CircleMarker
L.LayerGroup
L.FeatureGroup
L.GeoJson
L.LatLng
L.LatLngBounds
L.Point
L.Bounds
L.Icon
L.DivIcon
L.Control
L.Control.zoom
L.Control.Attribution
L.Control.Layers
L.Control.Scale
Events methods
Event objects
L.Class
L.Browser
L.Util
L.Transformation
L.LineUtil
L.PolyUtil
L.DomEvent
L.DomUtil
L.PosAnimation
L.Draggable
L.IHandler
L.ILayer
L.IControl
L.IProjection
L.ICRS
Global Switches
L.noConflict
L.version