LineUtil
Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.
Methods
Method | 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. 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(
|
Point |
Returns the closest point from a point p on a segment p1 to p2 . |
clipSegment(
|
Point[] |
Clips the segment a to b by rectangular bounds. Returns either false or an array of clipped points. Used by Leaflet to only show polyline points that are on the screen or near, increasing performance. |
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