Class BaseMapLayer<T extends BaseMapLayer<?>>

java.lang.Object
com.jbstrap.core.Parameters
com.jbstrap.jbmap.BaseMapLayer<T>
Type Parameters:
T - MapLayer or tile layer class type
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OpenStreetMapLayer

public class BaseMapLayer<T extends BaseMapLayer<?>> extends com.jbstrap.core.Parameters

The MapLayer base class. All tile layers must extend this class.

Since:
4.0
See Also:
  • Field Details

  • Constructor Details

    • BaseMapLayer

      protected BaseMapLayer(String name, String url)
      Creates the tile layer.
      Parameters:
      name - The name of the tile layer
      url - Tile layer URL
  • Method Details

    • getName

      public String getName()
      Gets the tile layer name.
      Returns:
      The tile layer name
    • getUrl

      public String getUrl()
      Gets the tile layer URL.
      Returns:
      The tile layer URL
    • setCopyRightText

      public T setCopyRightText(String attribution)
      In the lower right corner of the map, next to the "Leaflet" text, you can display any other text. E.g. you can display the map provider's name. As for OpenStreetMap, this is required copyright information.
      Parameters:
      attribution - Required content
      Returns:
      The instantiated BaseMapLayer class
    • setZIndex

      public T setZIndex(int zIndex)
      Sets the stack order of the tile layer. You can do this by setting the z index parameter (CSS3). Z indexes of map panes:
      • baseMapLayer: 200
      • overlayPane: 400
      • shadow (only for pointImage): 500
      • layers: 600
      • tooltip: 650
      • popup: 700
      Parameters:
      zIndex - The tile layer's stack order
      Returns:
      The instantiated BaseMapLayer class
    • getZIndex

      public Integer getZIndex()
      Gets the tile layer's z index.
      Returns:
      The tile layer's z index
    • getProperties

      protected com.jbstrap.core.Parameters getProperties()
      Gets the settings parameters.
      Returns:
      Parameters
    • getCopyRightText

      public String getCopyRightText()
      Gets the copyright content.
      Returns:
      Copyright content