LineUtil
Various utility functions for polyine points processing, used by Leaflet internally to make polylines lightning-fast.
Functions
Function | Returns | Description |
---|---|---|
simplify( |
Point[] |
Dramatically reduces the number of points in a polyline while retaining its shape and returns a new array of simplified points, using the Douglas-Peucker algorithm. Used for a huge performance boost when processing/displaying Leaflet polylines for each zoom level and also reducing visual noise. tolerance affects the amount of simplification (lesser value means higher quality but slower and with more points). Also released as a separated micro-library Simplify.js. |
pointToSegmentDistance( |
Number |
Returns the distance between point p and segment p1 to p2 . |
closestPointOnSegment( |
Number |
Returns the closest point from a point p on a segment p1 to p2 . |
clipSegment( |
Point[]|Boolean |
Clips the segment a to b by rectangular bounds with the Cohen-Sutherland algorithm (modifying the segment points directly!). Used by Leaflet to only show polyline points that are on the screen or near, increasing performance. |
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