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:
  • Field Details

  • Constructor Details

    • BaseMap

      protected BaseMap()
      Creates a map parameter class instance with the built-in OpenStreetMapLayer tile layer.
    • BaseMap

      protected BaseMap(BaseMapLayer<?> tileLayer)
      Creates a map parameter class instance with a tile layer different from the default BaseMapLayer.
      Parameters:
      tileLayer - Tile layer
  • Method Details

    • addBaseMapLayer

      protected void addBaseMapLayer(BaseMapLayer<?> baseMapLayer)
      Sets the tile layer parameters.
      Parameters:
      baseMapLayer - Tile layer instance
    • getBaseMapLayerByName

      protected BaseMapLayer<?> getBaseMapLayerByName(String name)
      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

      protected void removeBaseMapLayer(BaseMapLayer<?> baseMapLayer)
      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

      protected void setCenter(List<Double> coordinates)
      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

      protected ArrayList<Double> 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

      protected void setZoomInText(String text)
      Sets the zoom in text. The default setting is "+".
      Parameters:
      text - Zoom in text
    • getZoomInText

      protected String getZoomInText()
      Gets the zoom in text parameter. The default setting is "+".
      Returns:
      Zoom in text parameter
    • setZoomInTitle

      protected void setZoomInTitle(String text)
      Sets the map's zoom in button's tooltip parameter.
      Parameters:
      text - Tooltip text The default setting is "Zoom in".
    • getZoomInTitle

      protected String getZoomInTitle()
      Gets the zoom in button�s tooltip parameter.
      Returns:
      Tooltip button The default setting is "Zoom in".
    • setZoomOutText

      protected void setZoomOutText(String text)
      Sets the zoom out text parameter. The default setting is "-".
      Parameters:
      text - Zoom out text
    • getZoomOutText

      protected String getZoomOutText()
      Gets the zoom out text. The default setting is "-".
      Returns:
      Zoom out text parameter
    • setZoomOutTitle

      protected void setZoomOutTitle(String text)
      Sets the map�s zoom out button�s tooltip parameter.
      Parameters:
      text - Tooltip text The default setting is "Zoom out".
    • getZoomOutTitle

      protected String 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 is true.
    • 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 is true.
    • 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 is true.
    • 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 is true.
    • 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 is true.
    • 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 is true.
    • 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 is true.
    • 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

      protected void setDivLayers(List<com.jbstrap.core.Parameters> divLayers)
      Sets the divLayer parameters.
      Parameters:
      divLayers - A list of divLayer parameters
    • getDivLayers

      protected List<com.jbstrap.core.Parameters> getDivLayers()
      Gets the divLayer parameters.
      Returns:
      A list of divLayer parameters
    • setLayerStyles

      protected void setLayerStyles(List<com.jbstrap.core.Parameters> styles)
      Sets the layer styles.
      Parameters:
      styles - A list of layer style parameters
    • getLayerStyles

      protected List<com.jbstrap.core.Parameters> getLayerStyles()
      Gets the layer style parameters.
      Returns:
      A list of layer style parameters
    • setPointImages

      protected void setPointImages(List<com.jbstrap.core.Parameters> images)
      Sets the PointImage parameters.
      Parameters:
      images - A list of layer style parameters
    • getPointImages

      protected List<com.jbstrap.core.Parameters> getPointImages()
      Gets the PointImage parameters.
      Returns:
      A list of PointImage parameters.