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, removeMouseListener
getLayers, hasLayer
public 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 FeatureGroup
html
- poup HTML contentpublic MultiPolyline bindPopup(String html, PopupOptions options)
bindPopup
in class FeatureGroup
html
- poup HTML contentoptions
- popup configuration objectpublic MultiPolyline setStyle(PathOptions options)
PathOptions
object.setStyle
in class FeatureGroup
options
- path configuration optionspublic MultiPolyline bringToFront()
bringToFront
in class FeatureGroup
public MultiPolyline bringToBack()
bringToBack
in class FeatureGroup
public MultiPolyline addTo(Map map)
addTo
in class FeatureGroup
map
- The mappublic MultiPolyline addLayer(ILayer layer)
addLayer
in class FeatureGroup
layer
- The layer to addpublic MultiPolyline removeLayer(ILayer layer)
removeLayer
in class FeatureGroup
layer
- The layer to removepublic MultiPolyline removeLayer(String layerId)
removeLayer
in class FeatureGroup
layerId
- The layer id of the layer to removepublic MultiPolyline clearLayers()
clearLayers
in class FeatureGroup
Copyright © 2017. All rights reserved.