Package com.jbstrap.jbmap
Class BaseMap
java.lang.Object
com.jbstrap.core.Parameters
com.jbstrap.jbmap.BaseMap
- All Implemented Interfaces:
Serializable
public class BaseMap
extends com.jbstrap.core.Parameters
- Since:
- 4.0
- See Also:
-
Parameters
- Serialized Form
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseMap()
Creates a map parameter class instance with the built-inOpenStreetMapLayer
tile layer.protected
BaseMap
(BaseMapLayer<?> tileLayer) Creates a map parameter class instance with a tile layer different from the defaultBaseMapLayer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBaseMapLayer
(BaseMapLayer<?> baseMapLayer) Sets the tile layer parameters.protected BaseMapLayer<?>
getBaseMapLayerByName
(String name) Gets a tile layer parameter.Gets the center parameters of the map.protected List<com.jbstrap.core.Parameters>
Gets the divLayer parameters.protected List<com.jbstrap.core.Parameters>
Gets the layer style parameters.protected int
Gets the maximum zoom setting.protected int
Gets the minimum zoom setting.protected List<com.jbstrap.core.Parameters>
Gets the PointImage parameters.protected int
getZoom()
Gets the zoom parameter.protected double
Gets the zoom delta parameter.protected String
Gets the zoom in text parameter.protected String
Gets the zoom in button�s tooltip parameter.protected String
Gets the zoom out text.protected String
Gets the map�s zoom out button�s tooltip parameter.protected double
Gets the zoom snap parameter.protected boolean
Checks if the box zoom is enabled.protected boolean
Checks if the popups close automatically upon a mouse click.protected boolean
Gets the double click enabled parameter.protected boolean
Gets the map dragging parameter.protected boolean
Gets the click event enable parameter.protected boolean
Gets the scale visibility value.protected boolean
Checks if the mouse scrolling zoom is enabled.protected boolean
Checks if the "tracking resize" feature is enabled.protected boolean
Checks if the zoom animation is enabled.protected boolean
Gets the zoom controls visibility setting.protected void
Removes a tile layer parameter.protected void
removeBaseMapLayer
(BaseMapLayer<?> baseMapLayer) Removes a tile layer parameter.protected void
setBoxZoom
(boolean enable) Enables the box zoom feature.protected void
Sets the map center parameters.protected void
setClosePopupOnClick
(boolean enable) Sets the popups to close automatically upon a mouse click.protected void
setDivLayers
(List<com.jbstrap.core.Parameters> divLayers) Sets the divLayer parameters.protected void
setDoubleClickZoom
(boolean enable) Sets the double click enabled parameter.protected void
setDragging
(boolean enable) Sets the map dragging parameter.protected void
setLayerStyles
(List<com.jbstrap.core.Parameters> styles) Sets the layer styles.protected void
setMapClick
(boolean mapClick) Enables the click event on the map.protected void
setMaxZoom
(int zoom) Sets the maximum zoom setting.protected void
setMinZoom
(int zoom) Sets the minimum zoom setting.protected void
setPointImages
(List<com.jbstrap.core.Parameters> images) Sets the PointImage parameters.protected void
setScaleControl
(boolean scaleControl) Sets the scale visibility on the map.protected void
setScrollWheelZoom
(boolean enable) Sets the mouse scrolling zoom feature.protected void
setTrackResize
(boolean enable) Enables the "tracking resize" feature.protected void
setZoom
(int zoom) Sets the zoom parameter.protected void
setZoomAnimation
(boolean enable) Enables the zoom animation.protected void
setZoomControlVisible
(boolean visible) Sets the visibility parameter of the zoom controls.protected void
setZoomDelta
(double zoomDelta) Sets the zoom delta parameter.protected void
setZoomInText
(String text) Sets the zoom in text.protected void
setZoomInTitle
(String text) Sets the map's zoom in button's tooltip parameter.protected void
setZoomOutText
(String text) Sets the zoom out text parameter.protected void
setZoomOutTitle
(String text) Sets the map�s zoom out button�s tooltip parameter.protected void
setZoomSnap
(double zoomSnap) Sets the zoom snap parameter.Methods inherited from class com.jbstrap.core.Parameters
add, b, b, clear, copy, deserialize, equals, get, getAsBoolean, getAsDate, getAsDate, getAsDouble, getAsInteger, getAsLong, getAsNumber, getAsString, getNames, isEmpty, merge, remove, serialize, toString
-
Field Details
-
NAME
- See Also:
-
MAP_CLICK
- See Also:
-
MAP_TILES
- See Also:
-
VIEW
- See Also:
-
CENTER
- See Also:
-
ZOOM
- See Also:
-
ZOOM_CONTROL
- See Also:
-
VISIBLE
- See Also:
-
ZOOM_IN_TEXT
- See Also:
-
ZOOM_IN_TITLE
- See Also:
-
ZOOM_OUT_TEXT
- See Also:
-
ZOOM_OUT_TITLE
- See Also:
-
SCALE_CONTROL
- See Also:
-
MAP
- See Also:
-
MIN_ZOOM
- See Also:
-
MAX_ZOOM
- See Also:
-
DOUBLE_CLICK_ZOOM
- See Also:
-
DRAGGING
- See Also:
-
SCROLL_WHEEL_ZOOM
- See Also:
-
ZOOM_ANIMATION
- See Also:
-
ZOOM_DELTA
- See Also:
-
ZOOM_SNAP
- See Also:
-
BOX_ZOOM
- See Also:
-
CLOSE_POPUP_ON_CLICK
- See Also:
-
TRACK_RESIZE
- See Also:
-
-
Constructor Details
-
BaseMap
protected BaseMap()Creates a map parameter class instance with the built-inOpenStreetMapLayer
tile layer. -
BaseMap
Creates a map parameter class instance with a tile layer different from the defaultBaseMapLayer
.- Parameters:
tileLayer
- Tile layer
-
-
Method Details
-
addBaseMapLayer
Sets the tile layer parameters.- Parameters:
baseMapLayer
- Tile layer instance
-
getBaseMapLayerByName
Gets a tile layer parameter.- Parameters:
name
- Tile layer name- Returns:
- Tile layer If there is no tile layer with the specified name, the method returns
null
.
-
removeBaseMapLayer
Removes a tile layer parameter.- Parameters:
baseMapLayer
- The tile layer parameter instance to be removed
-
removeAllBaseMapLayer
protected void removeAllBaseMapLayer()Removes a tile layer parameter. -
setCenter
Sets the map center parameters.- Parameters:
coordinates
- In the list of coordinates, the first item is the longitude, the second item is the latitude
-
getCenter
Gets the center parameters of the map.- Returns:
- The center coordinates of the map
-
setZoom
protected void setZoom(int zoom) Sets the zoom parameter.- Parameters:
zoom
- Zoom parameter
-
getZoom
protected int getZoom()Gets the zoom parameter.- Returns:
- The zoom parameter
-
setMapClick
protected void setMapClick(boolean mapClick) Enables the click event on the map.- Parameters:
mapClick
- Map click event enable parameter
-
isMapClick
protected boolean isMapClick()Gets the click event enable parameter.- Returns:
- The map's click event enable parameter
-
setScaleControl
protected void setScaleControl(boolean scaleControl) Sets the scale visibility on the map.- Parameters:
scaleControl
- Scale visibility value
-
isScaleControl
protected boolean isScaleControl()Gets the scale visibility value.- Returns:
true
if the scale is visible, otherwise not visible
-
setZoomControlVisible
protected void setZoomControlVisible(boolean visible) Sets the visibility parameter of the zoom controls.- Parameters:
visible
- Zoom controls visibility parameter
-
isZoomControlVisible
protected boolean isZoomControlVisible()Gets the zoom controls visibility setting.- Returns:
true
if the zoom controls are visible, otherwise not
-
setZoomInText
Sets the zoom in text. The default setting is"+"
.- Parameters:
text
- Zoom in text
-
getZoomInText
Gets the zoom in text parameter. The default setting is"+"
.- Returns:
- Zoom in text parameter
-
setZoomInTitle
Sets the map's zoom in button's tooltip parameter.- Parameters:
text
- Tooltip text The default setting is"Zoom in"
.
-
getZoomInTitle
Gets the zoom in button�s tooltip parameter.- Returns:
- Tooltip button The default setting is
"Zoom in"
.
-
setZoomOutText
Sets the zoom out text parameter. The default setting is"-"
.- Parameters:
text
- Zoom out text
-
getZoomOutText
Gets the zoom out text. The default setting is"-"
.- Returns:
- Zoom out text parameter
-
setZoomOutTitle
Sets the map�s zoom out button�s tooltip parameter.- Parameters:
text
- Tooltip text The default setting is"Zoom out"
.
-
getZoomOutTitle
Gets the map�s zoom out button�s tooltip parameter.- Returns:
- Zoom out button tooltip The default setting is
"Zoom out"
.
-
setMinZoom
protected void setMinZoom(int zoom) Sets the minimum zoom setting.- Parameters:
zoom
- Minimum zoom setting
-
getMinZoom
protected int getMinZoom()Gets the minimum zoom setting.- Returns:
- Minimum zoom setting (default: 0)
-
setMaxZoom
protected void setMaxZoom(int zoom) Sets the maximum zoom setting.- Parameters:
zoom
- Maximum zoom setting The default setting is 18.
-
getMaxZoom
protected int getMaxZoom()Gets the maximum zoom setting.- Returns:
- zoom Maximum zoom setting The default setting is 18.
-
setDoubleClickZoom
protected void setDoubleClickZoom(boolean enable) Sets the double click enabled parameter.- Parameters:
enable
- Double click enabled The default setting istrue
.
-
isDoubleClickZoom
protected boolean isDoubleClickZoom()Gets the double click enabled parameter.- Returns:
- Double click enabled The default setting is
true
.
-
setDragging
protected void setDragging(boolean enable) Sets the map dragging parameter.- Parameters:
enable
- Map dragging enabled The default setting istrue
.
-
isDragging
protected boolean isDragging()Gets the map dragging parameter.- Returns:
- Map dragging enabled The default setting is
true
.
-
setScrollWheelZoom
protected void setScrollWheelZoom(boolean enable) Sets the mouse scrolling zoom feature.- Parameters:
enable
- Mouse scrolling zoom enabled The default setting istrue
.
-
isScrollWheelZoom
protected boolean isScrollWheelZoom()Checks if the mouse scrolling zoom is enabled.- Returns:
- Mouse scrolling zoom enabled The default setting is
true
.
-
setZoomAnimation
protected void setZoomAnimation(boolean enable) Enables the zoom animation.- Parameters:
enable
- Zoom animation enabled The default setting istrue
.
-
isZoomAnimation
protected boolean isZoomAnimation()Checks if the zoom animation is enabled.- Returns:
- Zoom animation enabled The default setting is
true
.
-
setBoxZoom
protected void setBoxZoom(boolean enable) Enables the box zoom feature.- Parameters:
enable
- Box zoom enabled The default setting istrue
.
-
isBoxZoom
protected boolean isBoxZoom()Checks if the box zoom is enabled.- Returns:
- Box zoom enabled The default setting is
true
.
-
setClosePopupOnClick
protected void setClosePopupOnClick(boolean enable) Sets the popups to close automatically upon a mouse click.- Parameters:
enable
- Popups close automatically upon a mouse click The default setting istrue
.
-
isClosePopupOnClick
protected boolean isClosePopupOnClick()Checks if the popups close automatically upon a mouse click.- Returns:
- Popups close automatically upon a mouse click The default setting is
true
.
-
setTrackResize
protected void setTrackResize(boolean enable) Enables the "tracking resize" feature.- Parameters:
enable
- "Tracking resize" enabled The default setting istrue
.
-
isTrackResize
protected boolean isTrackResize()Checks if the "tracking resize" feature is enabled.- Returns:
- "Tracking resize" feature enabled The default setting is
true
.
-
setZoomDelta
protected void setZoomDelta(double zoomDelta) Sets the zoom delta parameter.- Parameters:
zoomDelta
- Zoom delta parameter The default setting is 1.
-
getZoomDelta
protected double getZoomDelta()Gets the zoom delta parameter.- Returns:
- Zoom delta parameter. Default setting is 1.
-
setZoomSnap
protected void setZoomSnap(double zoomSnap) Sets the zoom snap parameter.- Parameters:
zoomSnap
- Zoom snap parameter The default setting is 1.
-
getZoomSnap
protected double getZoomSnap()Gets the zoom snap parameter.- Returns:
- Zoom snap The default setting is 1.
-
setDivLayers
Sets the divLayer parameters.- Parameters:
divLayers
- A list of divLayer parameters
-
getDivLayers
Gets the divLayer parameters.- Returns:
- A list of divLayer parameters
-
setLayerStyles
Sets the layer styles.- Parameters:
styles
- A list of layer style parameters
-
getLayerStyles
Gets the layer style parameters.- Returns:
- A list of layer style parameters
-
setPointImages
Sets the PointImage parameters.- Parameters:
images
- A list of layer style parameters
-
getPointImages
Gets the PointImage parameters.- Returns:
- A list of PointImage parameters.
-