Package com.jbstrap.jbmap.layers.layer
Class Line
- All Implemented Interfaces:
com.jbstrap.core.event.handlers.BrowserEventHandler,PopupDrawnEventHandler,PopupHideEventHandler,LayerStyleLayer<Line>,TooltipLayer<Line>,MultiCoordinatesLayer
public class Line
extends BaseLayer<Line>
implements PopupDrawnEventHandler, PopupHideEventHandler, TooltipLayer<Line>, LayerStyleLayer<Line>, MultiCoordinatesLayer
This class represents a line on the map.
You can add a tooltip to the line. Read more about tooltip configuration in the
TooltipLayer class.
You can add a layer style to the line. Read more about layer style configuration in the LayerStyleLayer class.- Since:
- 4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class com.jbstrap.jbmap.layers.BaseLayer
COORDINATES, layerStyle, NAME, POINT, POINT_TYPE, popup, POPUP_CONTENT, POPUP_ENABLED, POPUP_OPENED, TYPEFields inherited from class com.jbstrap.jbmap.layers.Layer
componentContent, params, parentFields inherited from interface com.jbstrap.jbmap.layers.LayerStyleLayer
STYLEFields inherited from interface com.jbstrap.jbmap.layers.TooltipLayer
TOOLTIP_CONTENT, TOOLTIP_ENABLED, TOOLTIP_OPENED -
Constructor Summary
ConstructorsConstructorDescriptionLine(String name, Coordinates... coordinates) Creates a line with the layer's unique name and a list of point coordinates.Line(String name, List<Coordinates> coordinates) Creates an line with the layer's unique name and a list of point coordinates. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of line layer coordinates.voidonPopupDrawn(PopupDrawnEvent event) Registering the events for the popup draw event in the popup component.voidonPopupHide(PopupHideEvent event) Registering the events for the popup hide event in the popup component.setCoordinatesList(List<Coordinates> coordinates) Gets a list of line layer coordinates.Methods inherited from class com.jbstrap.jbmap.layers.BaseLayer
addClickHandler, addCustomParam, addMouseOutHandler, addMouseOverHandler, closePopup, getClickHandlers, getCustomParams, getGeometry, getMouseOutHandlers, getMouseOverHandlers, getName, getParams, getParent, getPopup, getPopupContent, getProperties, getTitle, hide, isPopupEnabled, isShown, openPopup, removeClickHandler, removeCustomParam, removeMouseOutHandler, removeMouseOverHandler, runJSLayer, runJSLayerGroup, setCoordinates, setCustomParams, setParent, setPopupContent, setPopupEnabled, setTitle, showMethods inherited from class com.jbstrap.jbmap.layers.Layer
getContent, runAfterDrawOnLayer, runOnHideOnLayer, runOnShowOnLayerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jbstrap.jbmap.layers.LayerStyleLayer
getLayerStyle, setLayerStyleMethods inherited from interface com.jbstrap.jbmap.layers.TooltipLayer
closeTooltip, getTooltipContent, isTooltipEnabled, isTooltipOpened, openTooltip, setTooltipContent, setTooltipEnabled
-
Field Details
-
LINE_STRING
- See Also:
-
SMOOTH_FACTOR
- See Also:
-
NO_CLIP
- See Also:
-
-
Constructor Details
-
Line
Creates an line with the layer's unique name and a list of point coordinates.- Parameters:
name- Line layer unique name Use thenameparameter to get the layer from a layer group.LayerGroupcoordinates- A list of line point coordinates These points are connected by line segments, following the order of the points.Coordinates- Throws:
NullPointerException- Thrown if the value of thenameparameter isnull
-
Line
Creates a line with the layer's unique name and a list of point coordinates.- Parameters:
name- Line layer unique name Use thenameparameter to get the layer from a layer group.LayerGroupcoordinates- A list of line point coordinates These points are connected by line segments, following the order of the points.Coordinates- Throws:
NullPointerException- Thrown if the value of thenameparameter isnull
-
-
Method Details
-
getCoordinatesList
Gets a list of line layer coordinates.- Returns:
- Line layer point coordinates
-
setCoordinatesList
Gets a list of line layer coordinates. The coordinates in the list are the coordinates of the line points connected by line segments, following an order specified in the list.- Parameters:
coordinates- A list of line layer point coordinates- Returns:
- Line class instance
-
onPopupDrawn
Registering the events for the popup draw event in the popup component.- Specified by:
onPopupDrawnin interfacePopupDrawnEventHandler- Parameters:
event- The popup drawn event component
-
onPopupHide
Registering the events for the popup hide event in the popup component.- Specified by:
onPopupHidein interfacePopupHideEventHandler- Parameters:
event- The popup hide event component
-