java.lang.Object
org.openstreetmap.josm.data.imagery.vectortile.mapbox.style.Source

public class Source extends Object
A source from a Mapbox Vector Style
Since:
17862
See Also:
  • Field Details

    • WMS_BBOX

      private static final String WMS_BBOX
      WMS servers should contain a "{bbox-epsg-3857}" parameter for the bbox
      See Also:
    • NO_URLS

      private static final String[] NO_URLS
    • ZOOM_BOUND_FUNCTION

      private static final IntFunction<Integer> ZOOM_BOUND_FUNCTION
      Constrain the min/max zooms to be between 0 and 30, as per tilejson spec
    • name

      private final String name
      The name of the source
    • sourceType

      private final SourceType sourceType
      The type of the source
    • minZoom

      private final int minZoom
      The minimum zoom supported
    • maxZoom

      private final int maxZoom
      The maximum zoom supported
    • tileUrls

      private final String[] tileUrls
      The tile urls. These usually have replaceable fields.
    • attribution

      private final String attribution
      The attribution to display for the user
    • bounds

      private final Bounds bounds
      The bounds of the data. We should not request data outside of the bounds
    • promoteId

      private final String promoteId
      The property to use as a feature id. Can be parameterized
    • scheme

      private final Scheme scheme
      The tile scheme
    • volatileCache

      private final boolean volatileCache
      true if the tiles should not be cached
    • tileSize

      private final int tileSize
      The tile size
  • Constructor Details

    • Source

      public Source(String name, jakarta.json.JsonObject data)
      Create a new Source object
      Parameters:
      name - The name of the source object
      data - The data to set the source information with
  • Method Details

    • getBounds

      public Bounds getBounds()
      Get the bounds for this source
      Returns:
      The bounds where this source can be used
    • getName

      public String getName()
      Get the source name
      Returns:
      the name
    • getUrls

      public List<String> getUrls()
      Get the URLs that can be used to get vector data
      Returns:
      The urls
    • getMinZoom

      public int getMinZoom()
      Get the minimum zoom
      Returns:
      The min zoom (default 0)
    • getMaxZoom

      public int getMaxZoom()
      Get the max zoom
      Returns:
      The max zoom (default 22)
    • getAttributionText

      Get the attribution for this source
      Returns:
      The attribution text. May be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object