Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultiPolygon

Hierarchy

Implements

Index

Constructors

constructor

  • 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

Methods

addEventListener

addLayer

addOneTimeEventListener

addTo

bindPopup

  • Binds a popup with a particular HTML content to a click on any layer from the group that has a bindPopup method.

    Parameters

    Returns FeatureGroup<Polygon>

bringToBack

bringToFront

clearAllEventListeners

clearLayers

eachLayer

  • Iterates over the layers of the group, optionally specifying context of the iterator function.

    Parameters

    • fn: function
    • Optional context: any

    Returns LayerGroup<Polygon>

fire

fireEvent

getBounds

  • Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).

    Returns LatLngBounds

getLatLngs

  • Returns an array of arrays of geographical points in each polygon.

    Returns LatLng[][]

getLayer

  • Returns the layer with the given id.

    Parameters

    • id: string

    Returns Polygon

getLayerId

  • getLayerId(layer: ILayer): string

getLayers

  • Returns an array of all the layers added to the group.

    Returns Polygon[]

hasEventListeners

  • hasEventListeners(type: string): boolean

hasLayer

  • hasLayer(layer: Polygon): boolean
  • Returns true if the given layer is currently added to the group.

    Parameters

    Returns boolean

off

on

onAdd

  • onAdd(map: Map): void
  • Should contain code that creates DOM elements for the overlay, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

    Parameters

    Returns void

onRemove

  • onRemove(map: Map): void
  • Should contain all clean up code that removes the overlay's elements from the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).

    Parameters

    Returns void

once

openPopup

  • Opens the popup previously bound by bindPopup.

    Returns MultiPolygon

removeEventListener

removeLayer

setLatLngs

  • Replace all polygons and their paths with the given array of arrays of geographical points.

    Parameters

    Returns MultiPolygon

setStyle

toGeoJSON

  • toGeoJSON(): any
  • Returns a GeoJSON representation of the multipolygon (GeoJSON MultiPolygon Feature).

    Returns any

Static addInitHook

  • addInitHook(methodName: string, ...args: any[]): void
  • You can also use the following shortcut when you just need to make one additional method call.

    Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns void

Static extend

  • You use L.Class.extend to define new classes, but you can use the same method on any class to inherit from it.

    Parameters

    Returns any