Package com.jbstrap.jbmap.layers.layer
Class Area
- All Implemented Interfaces:
com.jbstrap.core.event.handlers.BrowserEventHandler
,PopupDrawnEventHandler
,PopupHideEventHandler
,LayerStyleLayer<Area>
,TooltipLayer<Area>
,MultiCoordinatesLayer
public class Area
extends BaseLayer<Area>
implements PopupDrawnEventHandler, PopupHideEventHandler, TooltipLayer<Area>, LayerStyleLayer<Area>, MultiCoordinatesLayer
This class represents an area shape on the map.
You can add a tooltip to the area. Read more about tooltip configuration in the
TooltipLayer
class.
You can add a layer style to the area. Read more about layer style configuration in the LayerStyleLayer
class.- Since:
- 4.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
Fields inherited from class com.jbstrap.jbmap.layers.BaseLayer
COORDINATES, layerStyle, NAME, POINT, POINT_TYPE, popup, POPUP_CONTENT, POPUP_ENABLED, POPUP_OPENED, TYPE
Fields inherited from class com.jbstrap.jbmap.layers.Layer
componentContent, params, parent
Fields inherited from interface com.jbstrap.jbmap.layers.LayerStyleLayer
STYLE
Fields inherited from interface com.jbstrap.jbmap.layers.TooltipLayer
TOOLTIP_CONTENT, TOOLTIP_ENABLED, TOOLTIP_OPENED
-
Constructor Summary
ConstructorDescriptionArea
(String name, Coordinates... coordinates) Creates an area with the layer's unique name and a list of point coordinates.Area
(String name, List<Coordinates> coordinates) Creates an area with the layer's unique name and a list of point coordinates. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of area layer coordinates.void
onPopupDrawn
(PopupDrawnEvent event) Registering the events for the popup draw event in the popup component.void
onPopupHide
(PopupHideEvent event) Registering the events for the popup hide event in the popup component.setCoordinatesList
(List<Coordinates> coordinates) Sets a list of area layer point 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, show
Methods inherited from class com.jbstrap.jbmap.layers.Layer
getContent, runAfterDrawOnLayer, runOnHideOnLayer, runOnShowOnLayer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.jbmap.layers.LayerStyleLayer
getLayerStyle, setLayerStyle
Methods inherited from interface com.jbstrap.jbmap.layers.TooltipLayer
closeTooltip, getTooltipContent, isTooltipEnabled, isTooltipOpened, openTooltip, setTooltipContent, setTooltipEnabled
-
Field Details
-
POLYGON
- See Also:
-
SMOOTH_FACTOR
- See Also:
-
NO_CLIP
- See Also:
-
-
Constructor Details
-
Area
Creates an area with the layer's unique name and a list of point coordinates.- Parameters:
name
- The unique name of the area Use thename
parameter to get the layer from a layer group.LayerGroup
coordinates
- A list of area point coordinates These points are connected by line segments, following the order of the points.Coordinates
- Throws:
NullPointerException
- Thrown if the value of thename
parameter isnull
-
Area
Creates an area with the layer's unique name and a list of point coordinates.- Parameters:
name
- The unique name of the area Use thename
parameter to get the layer from a layer group.LayerGroup
coordinates
- A list of area point coordinates These points are connected by line segments, following the order of the points.Coordinates
- Throws:
NullPointerException
- Thrown if the value of thename
parameter isnull
-
-
Method Details
-
getCoordinatesList
Gets a list of area layer coordinates.- Returns:
- Area layer point coordinates
-
setCoordinatesList
Sets a list of area layer point coordinates. The coordinates in the list are the coordinates of the area points connected by line segments, following an order specified in the list. The last point is connected by a line segment with the first point, forming a closed area shape.- Parameters:
coordinates
- A list of area layer point coordinates- Returns:
- Area class instance
-
onPopupDrawn
Registering the events for the popup draw event in the popup component.- Specified by:
onPopupDrawn
in interfacePopupDrawnEventHandler
- Parameters:
event
- The popup drawn event component
-
onPopupHide
Registering the events for the popup hide event in the popup component.- Specified by:
onPopupHide
in interfacePopupHideEventHandler
- Parameters:
event
- The popup hide event component
-