Class XyzSource
java.lang.Object
- All Implemented Interfaces:
AbstractXyzSource.HasMaxZoom
,AbstractXyzSource.HasMinZoom
,AbstractXyzSource.HasTileSize
,AbstractXyzSource.HasXyzSourceOptions
,HasCrossOrigin
,HasGutter
,HasUrl
,Source.HasAttributions
,Source.HasAttributionsCollapsible
,Source.HasProjection
,Source.HasSourceOptions
,Source.HasWrapX
,TileSource.HasCacheSize
,TileSource.HasOpaque
,TileSource.HasTileSourceOptions
,UrlTileSource.HasUrls
,UrlTileSource.HasUrlTileSourceOptions
,Serializable
public class XyzSource
extends AbstractXyzSource
implements Source.HasSourceOptions, TileSource.HasTileSourceOptions, UrlTileSource.HasUrlTileSourceOptions, AbstractXyzSource.HasXyzSourceOptions, HasCrossOrigin, HasGutter
Source for tile data with URLs in a set XYZ format that are defined in a URL template.
By default, this follows the widely-used Google grid where x 0 and y 0 are in the
top left. Source can be used in
TileLayer
.
For more details see: XYZ docs
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.AbstractXyzSource
AbstractXyzSource.HasMaxZoom, AbstractXyzSource.HasMinZoom, AbstractXyzSource.HasTileSize, AbstractXyzSource.HasXyzSourceOptions
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.UrlTileSource
UrlTileSource.HasUrls, UrlTileSource.HasUrlTileSourceOptions
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.TileSource
TileSource.HasCacheSize, TileSource.HasOpaque, TileSource.HasTileSourceOptions
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.Source
Source.HasAttributions, Source.HasAttributionsCollapsible, Source.HasProjection, Source.HasSourceOptions, Source.HasWrapX
Nested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
MapObservableObject.ObjectChangeEvent
-
Field Summary
Fields inherited from class io.jmix.mapsflowui.kit.component.model.source.AbstractXyzSource
gutter, maxZoom, minZoom, tileSize
Fields inherited from class io.jmix.mapsflowui.kit.component.model.source.TileImageSource
crossOrigin
Fields inherited from class io.jmix.mapsflowui.kit.component.model.source.UrlTileSource
url, urls
Fields inherited from class io.jmix.mapsflowui.kit.component.model.source.TileSource
cacheSize, opaque
Fields inherited from class io.jmix.mapsflowui.kit.component.model.source.Source
attributions, attributionsCollapsible, id, projection, wrapX
Fields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getType()
getUrl()
getUrls()
getWrapX()
void
setAttributions
(List<String> attributions) void
setAttributionsCollapsible
(Boolean collapsible) void
setCacheSize
(Integer cacheSize) void
setCrossOrigin
(String crossOrigin) Sets the cross-origin attribute for loaded images.void
Sets the size in pixels of the gutter around image tiles to ignore.void
setMaxZoom
(Integer maxZoom) void
setMinZoom
(Integer minZoom) void
void
setProjection
(CRS projection) void
setTileSize
(Size tileSize) void
Sets the URL template.void
void
Sets whether the source should be looped along the X coordinate.withAttributions
(List<String> attributions) withAttributionsCollapsible
(Boolean collapsible) withCacheSize
(Integer cacheSize) withCrossOrigin
(String crossOrigin) withGutter
(Double gutter) SeesetGutter(Double)
.withMaxZoom
(Integer maxZoom) SeesetMaxZoom(Integer)
.withMinZoom
(Integer minZoom) SeesetMinZoom(Integer)
.withOpaque
(Boolean opaque) SeesetOpaque(Boolean)
.withProjection
(CRS projection) SeesetProjection(CRS)
.withTileSize
(Size tileSize) SeesetTileSize(Size)
.SeesetUrl(String)
.SeesetUrls(List)
.SeesetWrapX(Boolean)
.Methods inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
addChild, addListener, clearRemovedChildren, clearRemovedChildrenInDepth, equals, fireChangeEvent, getChildren, getEventBus, getMetaProperties, getRemovedChildren, getSyncId, hashCode, isDirty, isDirtyInDepth, markAsDirty, markAsDirtyInDepth, removeChild, setMapObjectChangeListener, setMetaProperty, setParent, unmarkDirtyInDepth
-
Constructor Details
-
XyzSource
public XyzSource()
-
-
Method Details
-
getType
- Specified by:
getType
in classMapObservableObject
-
getAttributions
- Specified by:
getAttributions
in interfaceSource.HasAttributions
- Overrides:
getAttributions
in classSource
- Returns:
- the attributions of the source or
null
if not set
-
setAttributions
- Specified by:
setAttributions
in interfaceSource.HasAttributions
- Overrides:
setAttributions
in classSource
- Parameters:
attributions
- info about copyrights and licences
-
withAttributions
- Parameters:
attributions
- info about copyrights and licences- Returns:
- current instance
-
getAttributionsCollapsible
- Specified by:
getAttributionsCollapsible
in interfaceSource.HasAttributionsCollapsible
- Overrides:
getAttributionsCollapsible
in classSource
- Returns:
- whether attributions should always be visible or can be hidden by info icon,
null
value means that default value is used:true
-
setAttributionsCollapsible
- Specified by:
setAttributionsCollapsible
in interfaceSource.HasAttributionsCollapsible
- Overrides:
setAttributionsCollapsible
in classSource
- Parameters:
collapsible
- whether attributions should always be visible
-
withAttributionsCollapsible
- Parameters:
collapsible
- whether attributions should always be visible- Returns:
- current instance
-
getProjection
- Specified by:
getProjection
in interfaceSource.HasProjection
- Overrides:
getProjection
in classSource
- Returns:
- projection or
null
if not set
-
setProjection
- Specified by:
setProjection
in interfaceSource.HasProjection
- Overrides:
setProjection
in classSource
- Parameters:
projection
- projection to set
-
withProjection
SeesetProjection(CRS)
.- Parameters:
projection
- projection to set- Returns:
- current instance
-
getWrapX
- Specified by:
getWrapX
in interfaceSource.HasWrapX
- Overrides:
getWrapX
in classSource
- Returns:
- whether the source should be looped along the X coordinate or
null
if not set
-
setWrapX
Sets whether the source should be looped along the X coordinate. The default value forXyzSource
istrue
.Note, wrapX attribute is set only at creation time and cannot be changed at runtime. For more details see: XYZ docs
- Specified by:
setWrapX
in interfaceSource.HasWrapX
- Overrides:
setWrapX
in classSource
- Parameters:
wrapX
- whether the source should be looped along the X coordinate
-
withWrapX
SeesetWrapX(Boolean)
.- Parameters:
wrapX
- whether the source should be looped along the X coordinate- Returns:
- current instance
-
getGutter
- Specified by:
getGutter
in interfaceHasGutter
- Overrides:
getGutter
in classAbstractXyzSource
- Returns:
- gutter or
null
if not set
-
setGutter
Sets the size in pixels of the gutter around image tiles to ignore. This allows artifacts of rendering at tile edges to be ignored. Supported images should be wider and taller than the tile size by a value of 2 x gutter.The default value is
0
.Note, gutter attribute is set only at creation time and cannot be changed at runtime.
For more details see: XYZ docs
- Specified by:
setGutter
in interfaceHasGutter
- Overrides:
setGutter
in classAbstractXyzSource
- Parameters:
gutter
- gutter to set
-
withGutter
SeesetGutter(Double)
.- Parameters:
gutter
- gutter to set- Returns:
- current instance
-
getTileSize
- Specified by:
getTileSize
in interfaceAbstractXyzSource.HasTileSize
- Overrides:
getTileSize
in classAbstractXyzSource
- Returns:
- the tile size or
null
if not set
-
setTileSize
- Specified by:
setTileSize
in interfaceAbstractXyzSource.HasTileSize
- Overrides:
setTileSize
in classAbstractXyzSource
- Parameters:
tileSize
- tile size to set
-
withTileSize
SeesetTileSize(Size)
.- Parameters:
tileSize
- tile size to set- Returns:
- current instance
-
getMaxZoom
- Specified by:
getMaxZoom
in interfaceAbstractXyzSource.HasMaxZoom
- Overrides:
getMaxZoom
in classAbstractXyzSource
- Returns:
- max zoom level or
null
if not set
-
setMaxZoom
- Specified by:
setMaxZoom
in interfaceAbstractXyzSource.HasMaxZoom
- Overrides:
setMaxZoom
in classAbstractXyzSource
- Parameters:
maxZoom
- zoom to set
-
withMaxZoom
SeesetMaxZoom(Integer)
.- Parameters:
maxZoom
- zoom to set- Returns:
- current instance
-
getMinZoom
- Specified by:
getMinZoom
in interfaceAbstractXyzSource.HasMinZoom
- Overrides:
getMinZoom
in classAbstractXyzSource
- Returns:
- min zoom level or
null
if not set
-
setMinZoom
- Specified by:
setMinZoom
in interfaceAbstractXyzSource.HasMinZoom
- Overrides:
setMinZoom
in classAbstractXyzSource
- Parameters:
minZoom
- zoom to set
-
withMinZoom
SeesetMinZoom(Integer)
.- Parameters:
minZoom
- zoom to set- Returns:
- current instance
-
getCrossOrigin
- Specified by:
getCrossOrigin
in interfaceHasCrossOrigin
- Overrides:
getCrossOrigin
in classTileImageSource
- Returns:
- cross-origin or
null
if not set
-
setCrossOrigin
Sets the cross-origin attribute for loaded images.Note, cross-origin is set only at creation time and cannot be changed at runtime.
For more details see: XYZ docs
- Specified by:
setCrossOrigin
in interfaceHasCrossOrigin
- Overrides:
setCrossOrigin
in classTileImageSource
- Parameters:
crossOrigin
- cross-origin to set
-
withCrossOrigin
- Parameters:
crossOrigin
- cross-origin to set- Returns:
- current instance
-
getCacheSize
- Specified by:
getCacheSize
in interfaceTileSource.HasCacheSize
- Overrides:
getCacheSize
in classTileSource
- Returns:
- tile cache size or
null
if not set
-
setCacheSize
- Specified by:
setCacheSize
in interfaceTileSource.HasCacheSize
- Overrides:
setCacheSize
in classTileSource
- Parameters:
cacheSize
- the cache size to set
-
withCacheSize
- Parameters:
cacheSize
- the cache size to set- Returns:
- current instance
-
getOpaque
- Specified by:
getOpaque
in interfaceTileSource.HasOpaque
- Overrides:
getOpaque
in classTileSource
- Returns:
- whether the layer is opaque or
null
if not set
-
setOpaque
- Specified by:
setOpaque
in interfaceTileSource.HasOpaque
- Overrides:
setOpaque
in classTileSource
- Parameters:
opaque
- opaque option
-
withOpaque
SeesetOpaque(Boolean)
.- Parameters:
opaque
- opaque option- Returns:
- current instance
-
getUrl
- Specified by:
getUrl
in interfaceHasUrl
- Overrides:
getUrl
in classUrlTileSource
- Returns:
- URL or
null
if not set
-
setUrl
Sets the URL template. Must include {x}, {y} or {-y}, and {z} placeholders. A {?-?} template pattern, for examplesubdomain{a-f}.domain.com
, may be used instead of defining each one separately in thesetUrls(List)
.For more details see: XYZ docs
- Specified by:
setUrl
in interfaceHasUrl
- Overrides:
setUrl
in classUrlTileSource
- Parameters:
url
- url to set
-
withUrl
SeesetUrl(String)
.- Parameters:
url
- url to set- Returns:
- current instance
-
getUrls
- Specified by:
getUrls
in interfaceUrlTileSource.HasUrls
- Overrides:
getUrls
in classUrlTileSource
- Returns:
- list of URL patterns or
null
if not set
-
setUrls
- Specified by:
setUrls
in interfaceUrlTileSource.HasUrls
- Overrides:
setUrls
in classUrlTileSource
- Parameters:
urls
- url patterns to set
-
withUrls
SeesetUrls(List)
.- Parameters:
urls
- url patterns to set- Returns:
- current instance
-