Options
All
  • Public
  • Public/Protected
  • All
Menu

Module L

Index

Modules

Classes

Interfaces

Variables

Functions

Variables

tileLayer

tileLayer: TileLayerFactory

version

version: string

A constant that represents the Leaflet version in use.

Functions

bounds

  • Creates a Bounds object from two coordinates (usually top-left and bottom-right corners).

    Parameters

    Returns Bounds

  • Creates a Bounds object defined by the points it contains.

    Parameters

    Returns Bounds

canvasTiles

  • Returns CanvasTileLayer

circle

  • Instantiates a circle object given a geographical point, a radius in meters and optionally an options object.

    Parameters

    Returns Circle

circleMarker

  • Instantiates a circle marker given a geographical point and optionally an options object. The default radius is 10 and can be altered by passing a "radius" member in the path options object.

    Parameters

    Returns CircleMarker

divIcon

  • Creates a div icon instance with the given options.

    Parameters

    Returns DivIcon

draggable

  • draggable(element: HTMLElement, dragHandle?: HTMLElement): Draggable
  • Creates a Draggable object for moving the given element when you start dragging the dragHandle element (equals the element itself by default).

    Parameters

    • element: HTMLElement
    • Optional dragHandle: HTMLElement

    Returns Draggable

easyBar

easyButton

featureGroup

  • Create a layer group, optionally given an initial set of layers.

    Type parameters

    Parameters

    • Optional layers: T[]

    Returns FeatureGroup<T>

geoJson

  • Creates a GeoJSON layer. Optionally accepts an object in GeoJSON format to display on the map (you can alternatively add it later with addData method) and an options object.

    Parameters

    Returns GeoJSON

imageOverlay

  • Instantiates an image overlay object given the URL of the image and the geographical bounds it is tied to.

    Parameters

    Returns ImageOverlay

latLng

  • latLng(latitude: number, longitude: number): LatLng
  • latLng(coords: number[]): LatLng
  • Creates an object representing a geographical point with the given latitude and longitude.

    Parameters

    • latitude: number
    • longitude: number

    Returns LatLng

  • Creates an object representing a geographical point with the given latitude and longitude.

    Parameters

    • coords: number[]

    Returns LatLng

latLngBounds

  • Creates a LatLngBounds object by defining south-west and north-east corners of the rectangle.

    Parameters

    Returns LatLngBounds

  • Creates a LatLngBounds object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with fitBounds.

    Parameters

    Returns LatLngBounds

layerGroup

  • Create a layer group, optionally given an initial set of layers.

    Type parameters

    Parameters

    • Optional layers: T[]

    Returns LayerGroup<T>

map

  • Instantiates a map object given a div element and optionally an object literal with map options described below.

    Parameters

    Returns Map

  • Instantiates a map object given a div element id and optionally an object literal with map options described below.

    Parameters

    Returns Map

marker

  • Instantiates a Marker object given a geographical point and optionally an options object.

    Parameters

    Returns Marker

multiPolygon

  • Instantiates a multi-polyline object given an array of latlngs arrays (one for each individual polygon) and optionally an options object (the same as for MultiPolyline).

    Parameters

    Returns MultiPolygon

multiPolyline

  • Instantiates a multi-polyline object given an array of arrays of geographical points (one for each individual polyline) and optionally an options object.

    Parameters

    Returns MultiPolyline

noConflict

  • noConflict(): L
  • This method restores the L global variale to the original value it had before Leaflet inclusion, and returns the real Leaflet namespace.

    Returns L

point

  • point(x: number, y: number, round?: boolean): Point
  • Creates a Point object with the given x and y coordinates. If optional round is set to true, rounds the x and y values.

    Parameters

    • x: number
    • y: number
    • Optional round: boolean

    Returns Point

polygon

  • Instantiates a polygon object given an array of geographical points and optionally an options object (the same as for Polyline). You can also create a polygon with holes by passing an array of arrays of latlngs, with the first latlngs array representing the exterior ring while the remaining represent the holes inside.

    Parameters

    Returns Polygon

polyline

  • Instantiates a polyline object given an array of geographical points and optionally an options object.

    Parameters

    Returns Polyline

popup

  • Instantiates a Popup object given an optional options object that describes its appearance and location and an optional object that is used to tag the popup with a reference to the source object to which it refers.

    Parameters

    Returns Popup

rectangle

  • Instantiates a rectangle object with the given geographical bounds and optionally an options object.

    Parameters

    Returns Rectangle