Class Source
- 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:
- https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Source.ZoomBoundFunction
A common function for zoom constraints
-
Field Summary
Fields Modifier and Type Field Description private String
attribution
The attribution to display for the userprivate Bounds
bounds
The bounds of the data.private int
maxZoom
The maximum zoom supportedprivate int
minZoom
The minimum zoom supportedprivate String
name
The name of the sourceprivate static String[]
NO_URLS
private String
promoteId
The property to use as a feature id.private Scheme
scheme
The tile schemeprivate SourceType
sourceType
The type of the sourceprivate int
tileSize
The tile sizeprivate String[]
tileUrls
The tile urls.private boolean
volatileCache
true
if the tiles should not be cachedprivate static String
WMS_BBOX
WMS servers should contain a "{bbox-epsg-3857}" parameter for the bboxprivate static IntFunction<Integer>
ZOOM_BOUND_FUNCTION
Constrain the min/max zooms to be between 0 and 30, as per tilejson spec
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
String
getAttributionText()
Get the attribution for this sourceBounds
getBounds()
Get the bounds for this sourceint
getMaxZoom()
Get the max zoomint
getMinZoom()
Get the minimum zoomString
getName()
Get the source nameList<String>
getUrls()
Get the URLs that can be used to get vector dataint
hashCode()
String
toString()
-
-
-
Field Detail
-
WMS_BBOX
private static final String WMS_BBOX
WMS servers should contain a "{bbox-epsg-3857}" parameter for the bbox- See Also:
- Constant Field Values
-
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
-
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
-
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
-
volatileCache
private final boolean volatileCache
true
if the tiles should not be cached
-
tileSize
private final int tileSize
The tile size
-
-
Method Detail
-
getBounds
public Bounds getBounds()
Get the bounds for this source- Returns:
- The bounds where this source can be used
-
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
public String getAttributionText()
Get the attribution for this source- Returns:
- The attribution text. May be
null
.
-
-