Class Polyline
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.LeafletObject
org.vaadin.addons.componentfactory.leaflet.layer.Layer
org.vaadin.addons.componentfactory.leaflet.layer.InteractiveLayer
org.vaadin.addons.componentfactory.leaflet.layer.vectors.Path
org.vaadin.addons.componentfactory.leaflet.layer.vectors.Polyline
- All Implemented Interfaces:
Serializable,Evented,SupportsMouseEvents,HasStyle,Identifiable,LayerPopupFunctions,LayerTooltipFunctions,ExecutableFunctions,PathFunctions
- Direct Known Subclasses:
MultiPolyline,Polygon
A class for drawing polyline overlays on a map. Extends Path.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
Layer.LayerEventType -
Field Summary
Fields inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
DEFAULT_PANE -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a polyline from the given list of geographical points.Polyline(LatLngArray latlngs) Instantiates a polyline from the given array of geographical points.Instantiates a polyline from the given geographical points. -
Method Summary
Modifier and TypeMethodDescriptionReturns the LatLngBounds of the path.Gets the geographical points that make up this polyline.doubleGets how much to simplify the polyline on each zoom level.booleanisEmpty()Returns true if the Polyline has no LatLngs.booleanisNoClip()Whether polyline clipping is disabled.voidsetNoClip(boolean noClip) Disable polyline clipping.voidsetSmoothFactor(double smoothFactor) How much to simplify the polyline on each zoom level.Methods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.vectors.Path
getClassName, getColor, getDashArray, getDashOffset, getFillColor, getFillOpacity, getFillRule, getLineCap, getLineJoin, getOpacity, getStyle, getWeight, isFill, isStroke, setClassName, setColor, setDashArray, setDashOffset, setFill, setFillColor, setFillOpacity, setFillRule, setLineCap, setLineJoin, setOpacity, setStroke, setStyle, setWeightMethods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.InteractiveLayer
isBubblingMouseEvents, isInteractive, setBubblingMouseEvents, setInteractiveMethods inherited from class org.vaadin.addons.componentfactory.leaflet.layer.Layer
addEventListener, addTo, addTo, bindPopup, bindPopup, bindTooltip, bindTooltip, clearAllEventListeners, fireEvent, getAttribution, getEvents, getPane, getPopup, getTooltip, hasEventListeners, onAdd, onPopupClose, onPopupOpen, onRemove, onTooltipClose, onTooltipOpen, remove, removeEventListener, set, setAttribution, setPane, unbindPopup, unbindTooltipMethods inherited from class org.vaadin.addons.componentfactory.leaflet.LeafletObject
call, configureObjectMapper, executeJs, getConstructorArgumentNames, getJson, getLeafletType, getParent, getUuid, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.Evented
addEventListener, clearAllEventListeners, hasEventListeners, listens, off, off, on, removeEventListenerMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.map.functions.ExecutableFunctions
call, call, executeJs, executeJsMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.Identifiable
getUuidMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerPopupFunctions
closePopup, isPopupOpen, openPopup, openPopup, setPopupContent, setPopupContent, togglePopupMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.LayerTooltipFunctions
closeTooltip, isTooltipOpen, openTooltip, openTooltip, setTooltipContent, setTooltipContent, toggleTooltipMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.vectors.PathFunctions
bringToBack, bringToFront, redrawMethods inherited from interface org.vaadin.addons.componentfactory.leaflet.layer.events.supports.SupportsMouseEvents
onClick, onContextMenuOpened, onDoubleClick, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp
-
Constructor Details
-
Polyline
Instantiates a polyline from the given geographical points.- Parameters:
latlngs- the geographical points of the polyline
-
Polyline
Instantiates a polyline from the given list of geographical points.- Parameters:
latlngs- the geographical points of the polyline
-
Polyline
Instantiates a polyline from the given array of geographical points.- Parameters:
latlngs- the geographical points of the polyline
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns true if the Polyline has no LatLngs.- Returns:
- true if it has no coordinates
-
getBounds
Returns the LatLngBounds of the path.- Returns:
- the bounds of the polyline
-
getSmoothFactor
public double getSmoothFactor()Gets how much to simplify the polyline on each zoom level.- Returns:
- how much to simplify the polyline on each zoom level
-
setSmoothFactor
public void setSmoothFactor(double smoothFactor) How much to simplify the polyline on each zoom level. More means better performance and smoother look, and less means more accurate representation.- Parameters:
smoothFactor- how much to simplify the polyline on each zoom level
-
isNoClip
public boolean isNoClip()Whether polyline clipping is disabled.- Returns:
trueif polyline clipping is disabled
-
setNoClip
public void setNoClip(boolean noClip) Disable polyline clipping.- Parameters:
noClip- set it to true to disable polyline clipping
-
getLatlngs
Gets the geographical points that make up this polyline.- Returns:
- the coordinates of the polyline
-