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.HasXyzSourceOptionsNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.UrlTileSource
UrlTileSource.HasUrls, UrlTileSource.HasUrlTileSourceOptionsNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.TileSource
TileSource.HasCacheSize, TileSource.HasOpaque, TileSource.HasTileSourceOptionsNested classes/interfaces inherited from class io.jmix.mapsflowui.kit.component.model.source.Source
Source.HasAttributions, Source.HasAttributionsCollapsible, Source.HasProjection, Source.HasSourceOptions, Source.HasWrapXNested 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, tileSizeFields inherited from class io.jmix.mapsflowui.kit.component.model.source.TileImageSource
crossOriginFields inherited from class io.jmix.mapsflowui.kit.component.model.source.UrlTileSource
url, urlsFields inherited from class io.jmix.mapsflowui.kit.component.model.source.TileSource
cacheSize, opaqueFields inherited from class io.jmix.mapsflowui.kit.component.model.source.Source
attributions, attributionsCollapsible, id, projection, wrapXFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, parent, removedChildren, syncId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetType()getUrl()getUrls()getWrapX()voidsetAttributions(List<String> attributions) voidsetAttributionsCollapsible(Boolean collapsible) voidsetCacheSize(Integer cacheSize) voidsetCrossOrigin(String crossOrigin) Sets the cross-origin attribute for loaded images.voidSets the size in pixels of the gutter around image tiles to ignore.voidsetMaxZoom(Integer maxZoom) voidsetMinZoom(Integer minZoom) voidvoidsetProjection(CRS projection) voidsetTileSize(Size tileSize) voidSets the URL template.voidvoidSets 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:
getTypein classMapObservableObject
-
getAttributions
- Specified by:
getAttributionsin interfaceSource.HasAttributions- Overrides:
getAttributionsin classSource- Returns:
- the attributions of the source or
nullif not set
-
setAttributions
- Specified by:
setAttributionsin interfaceSource.HasAttributions- Overrides:
setAttributionsin classSource- Parameters:
attributions- info about copyrights and licences
-
withAttributions
- Parameters:
attributions- info about copyrights and licences- Returns:
- current instance
-
getAttributionsCollapsible
- Specified by:
getAttributionsCollapsiblein interfaceSource.HasAttributionsCollapsible- Overrides:
getAttributionsCollapsiblein classSource- Returns:
- whether attributions should always be visible or can be hidden by info icon,
nullvalue means that default value is used:true
-
setAttributionsCollapsible
- Specified by:
setAttributionsCollapsiblein interfaceSource.HasAttributionsCollapsible- Overrides:
setAttributionsCollapsiblein classSource- Parameters:
collapsible- whether attributions should always be visible
-
withAttributionsCollapsible
- Parameters:
collapsible- whether attributions should always be visible- Returns:
- current instance
-
getProjection
- Specified by:
getProjectionin interfaceSource.HasProjection- Overrides:
getProjectionin classSource- Returns:
- projection or
nullif not set
-
setProjection
- Specified by:
setProjectionin interfaceSource.HasProjection- Overrides:
setProjectionin classSource- Parameters:
projection- projection to set
-
withProjection
SeesetProjection(CRS).- Parameters:
projection- projection to set- Returns:
- current instance
-
getWrapX
- Specified by:
getWrapXin interfaceSource.HasWrapX- Overrides:
getWrapXin classSource- Returns:
- whether the source should be looped along the X coordinate or
nullif not set
-
setWrapX
Sets whether the source should be looped along the X coordinate. The default value forXyzSourceistrue.Note, wrapX attribute is set only at creation time and cannot be changed at runtime. For more details see: XYZ docs
- Specified by:
setWrapXin interfaceSource.HasWrapX- Overrides:
setWrapXin 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:
getGutterin interfaceHasGutter- Overrides:
getGutterin classAbstractXyzSource- Returns:
- gutter or
nullif 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:
setGutterin interfaceHasGutter- Overrides:
setGutterin classAbstractXyzSource- Parameters:
gutter- gutter to set
-
withGutter
SeesetGutter(Double).- Parameters:
gutter- gutter to set- Returns:
- current instance
-
getTileSize
- Specified by:
getTileSizein interfaceAbstractXyzSource.HasTileSize- Overrides:
getTileSizein classAbstractXyzSource- Returns:
- the tile size or
nullif not set
-
setTileSize
- Specified by:
setTileSizein interfaceAbstractXyzSource.HasTileSize- Overrides:
setTileSizein classAbstractXyzSource- Parameters:
tileSize- tile size to set
-
withTileSize
SeesetTileSize(Size).- Parameters:
tileSize- tile size to set- Returns:
- current instance
-
getMaxZoom
- Specified by:
getMaxZoomin interfaceAbstractXyzSource.HasMaxZoom- Overrides:
getMaxZoomin classAbstractXyzSource- Returns:
- max zoom level or
nullif not set
-
setMaxZoom
- Specified by:
setMaxZoomin interfaceAbstractXyzSource.HasMaxZoom- Overrides:
setMaxZoomin classAbstractXyzSource- Parameters:
maxZoom- zoom to set
-
withMaxZoom
SeesetMaxZoom(Integer).- Parameters:
maxZoom- zoom to set- Returns:
- current instance
-
getMinZoom
- Specified by:
getMinZoomin interfaceAbstractXyzSource.HasMinZoom- Overrides:
getMinZoomin classAbstractXyzSource- Returns:
- min zoom level or
nullif not set
-
setMinZoom
- Specified by:
setMinZoomin interfaceAbstractXyzSource.HasMinZoom- Overrides:
setMinZoomin classAbstractXyzSource- Parameters:
minZoom- zoom to set
-
withMinZoom
SeesetMinZoom(Integer).- Parameters:
minZoom- zoom to set- Returns:
- current instance
-
getCrossOrigin
- Specified by:
getCrossOriginin interfaceHasCrossOrigin- Overrides:
getCrossOriginin classTileImageSource- Returns:
- cross-origin or
nullif 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:
setCrossOriginin interfaceHasCrossOrigin- Overrides:
setCrossOriginin classTileImageSource- Parameters:
crossOrigin- cross-origin to set
-
withCrossOrigin
- Parameters:
crossOrigin- cross-origin to set- Returns:
- current instance
-
getCacheSize
- Specified by:
getCacheSizein interfaceTileSource.HasCacheSize- Overrides:
getCacheSizein classTileSource- Returns:
- tile cache size or
nullif not set
-
setCacheSize
- Specified by:
setCacheSizein interfaceTileSource.HasCacheSize- Overrides:
setCacheSizein classTileSource- Parameters:
cacheSize- the cache size to set
-
withCacheSize
- Parameters:
cacheSize- the cache size to set- Returns:
- current instance
-
getOpaque
- Specified by:
getOpaquein interfaceTileSource.HasOpaque- Overrides:
getOpaquein classTileSource- Returns:
- whether the layer is opaque or
nullif not set
-
setOpaque
- Specified by:
setOpaquein interfaceTileSource.HasOpaque- Overrides:
setOpaquein classTileSource- Parameters:
opaque- opaque option
-
withOpaque
SeesetOpaque(Boolean).- Parameters:
opaque- opaque option- Returns:
- current instance
-
getUrl
- Specified by:
getUrlin interfaceHasUrl- Overrides:
getUrlin classUrlTileSource- Returns:
- URL or
nullif 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:
setUrlin interfaceHasUrl- Overrides:
setUrlin classUrlTileSource- Parameters:
url- url to set
-
withUrl
SeesetUrl(String).- Parameters:
url- url to set- Returns:
- current instance
-
getUrls
- Specified by:
getUrlsin interfaceUrlTileSource.HasUrls- Overrides:
getUrlsin classUrlTileSource- Returns:
- list of URL patterns or
nullif not set
-
setUrls
- Specified by:
setUrlsin interfaceUrlTileSource.HasUrls- Overrides:
setUrlsin classUrlTileSource- Parameters:
urls- url patterns to set
-
withUrls
SeesetUrls(List).- Parameters:
urls- url patterns to set- Returns:
- current instance
-