public final class MultiPolyline extends FeatureGroup
FeatureGroup to allow creating multi-polylines (single
layer that consists of several polylines that share styling/popup).| Constructor and Description |
|---|
MultiPolyline(LatLng[][] latlngs)
Instantiates a multi-polyline object given an array of arrays of
geographical points (one for each individual polyline).
|
MultiPolyline(LatLng[][] latlngs,
PolyLineOptions options)
Instantiates a multi-polyline object given an array of arrays of
geographical points (one for each individual polyline) and an options
object.
|
| Modifier and Type | Method and Description |
|---|---|
MultiPolyline |
addLayer(ILayer layer)
Adds a given layer to the group.
|
MultiPolyline |
addTo(Map map)
Adds the group of layers to the map.
|
MultiPolyline |
bindPopup(String html)
Binds a popup with a particular HTML content to a click on this group.
|
MultiPolyline |
bindPopup(String html,
PopupOptions options)
Binds a popup with a particular HTML content and the given options to the
group.
|
MultiPolyline |
bringToBack()
Brings the layer to the bottom of all path layers.
|
MultiPolyline |
bringToFront()
Brings the layer to the top of all path layers.
|
MultiPolyline |
clearLayers()
Removes all the layers from the group.
|
LatLng[][] |
getLatLngs()
Returns an array of arrays of geographical points in each line.
|
MultiPolyline |
openPopup()
Opens the popup previously bound by
bindPopup. |
MultiPolyline |
removeLayer(ILayer layer)
Removes a given layer from the group.
|
MultiPolyline |
removeLayer(String layerId)
Removes a given layer of the given id from the group.
|
MultiPolyline |
setLatLngs(LatLng[][] latlngs)
Replace all lines and their paths with the given array of arrays of
geographical points.
|
MultiPolyline |
setStyle(PathOptions options)
Changes the appearance of a FeatureGroup based on the options in the
PathOptions object. |
addLayerListener, addMouseListener, clearAllEventListeners, getBounds, removeLayerListener, removeMouseListenergetLayers, hasLayerpublic MultiPolyline(LatLng[][] latlngs)
latlngs - arrays of geographical pointspublic MultiPolyline(LatLng[][] latlngs, PolyLineOptions options)
latlngs - arrays of geographical pointsoptions - configuration optionspublic MultiPolyline setLatLngs(LatLng[][] latlngs)
latlngs - array of arrays of geographical pointspublic LatLng[][] getLatLngs()
public MultiPolyline openPopup()
bindPopup.public MultiPolyline bindPopup(String html)
bindPopup in class FeatureGrouphtml - poup HTML contentpublic MultiPolyline bindPopup(String html, PopupOptions options)
bindPopup in class FeatureGrouphtml - poup HTML contentoptions - popup configuration objectpublic MultiPolyline setStyle(PathOptions options)
PathOptions object.setStyle in class FeatureGroupoptions - path configuration optionspublic MultiPolyline bringToFront()
bringToFront in class FeatureGrouppublic MultiPolyline bringToBack()
bringToBack in class FeatureGrouppublic MultiPolyline addTo(Map map)
addTo in class FeatureGroupmap - The mappublic MultiPolyline addLayer(ILayer layer)
addLayer in class FeatureGrouplayer - The layer to addpublic MultiPolyline removeLayer(ILayer layer)
removeLayer in class FeatureGrouplayer - The layer to removepublic MultiPolyline removeLayer(String layerId)
removeLayer in class FeatureGrouplayerId - The layer id of the layer to removepublic MultiPolyline clearLayers()
clearLayers in class FeatureGroupCopyright © 2017. All rights reserved.