Package com.jbstrap.jbmap.layers.layer
Class Point
- All Implemented Interfaces:
com.jbstrap.core.event.handlers.BrowserEventHandler
,PopupDrawnEventHandler
,PopupHideEventHandler
,TooltipLayer<Point>
public class Point
extends BaseLayer<Point>
implements PopupDrawnEventHandler, PopupHideEventHandler, TooltipLayer<Point>
This class represents a point or marker on the map with designated coordinates.
You can add a tooltip that you can configure freely. Read more about tooltip configuration in the
TooltipLayer
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.TooltipLayer
TOOLTIP_CONTENT, TOOLTIP_ENABLED, TOOLTIP_OPENED
-
Constructor Summary
ConstructorDescriptionPoint
(String name, Coordinates coordinates) Creates a marker point with a default image. -
Method Summary
Modifier and TypeMethodDescriptionGets the point coordinates.Gets the point image.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.setCoordinates
(Coordinates coordinates) Sets the point coordinates.setPointImage
(PointImage pointImage) Sets the point image.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.TooltipLayer
closeTooltip, getTooltipContent, isTooltipEnabled, isTooltipOpened, openTooltip, setTooltipContent, setTooltipEnabled
-
Field Details
-
MARKER
- See Also:
-
IMAGE
- See Also:
-
DEFAULT_ICON_URL
- See Also:
-
-
Constructor Details
-
Point
Creates a marker point with a default image.- Parameters:
name
- The name of the pointcoordinates
- Point coordinates- Throws:
NullPointerException
- Thrown if the value of thename
orcoordinates
parameter isnull
-
-
Method Details
-
getCoordinates
Gets the point coordinates.- Returns:
- Point coordinates
-
setCoordinates
Sets the point coordinates.- Parameters:
coordinates
- Longitude and latitude coordinates of the point- Returns:
- Point class instance
-
getPointImage
Gets the point image.- Returns:
- Point image
PointImage
-
setPointImage
Sets the point image.- Parameters:
pointImage
- Point imagePointImage
- Returns:
- Point 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
-