Class OsmSource
java.lang.Object
- All Implemented Interfaces:
AbstractXyzSource.HasMaxZoom,HasCrossOrigin,HasUrl,Source.HasAttributions,Source.HasWrapX,TileSource.HasCacheSize,TileSource.HasOpaque,Serializable
public class OsmSource
extends AbstractXyzSource
implements Source.HasAttributions, TileSource.HasCacheSize, HasCrossOrigin, AbstractXyzSource.HasMaxZoom, TileSource.HasOpaque, HasUrl, Source.HasWrapX
Source for the loading tiles from an OpenStreetMap tile server. It can be used in
TileLayer.
For more details see OSM 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, projection, wrapXFields inherited from class io.jmix.mapsflowui.kit.component.model.MapObservableObject
children, dirty, eventBus, listener, metaProperties, removedChildren, syncId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetType()getUrl()getWrapX()voidsetAttributions(List<String> attributions) voidsetCacheSize(Integer cacheSize) voidsetCrossOrigin(String crossOrigin) Sets the crossOrigin attribute for loaded images.voidsetMaxZoom(Integer maxZoom) voidSets whether the layer is opaque.voidSets the URL template.voidwithAttributions(List<String> attributions) withCacheSize(Integer cacheSize) withCrossOrigin(String crossOrigin) withMaxZoom(Integer maxZoom) SeesetMaxZoom(Integer).withOpaque(Boolean opaque) SeesetOpaque(Boolean).SeesetUrl(String).SeesetWrapX(Boolean).Methods inherited from class io.jmix.mapsflowui.kit.component.model.source.AbstractXyzSource
getGutter, getMinZoom, getTileSize, setGutter, setMinZoom, setTileSizeMethods inherited from class io.jmix.mapsflowui.kit.component.model.source.UrlTileSource
getUrls, setUrlsMethods inherited from class io.jmix.mapsflowui.kit.component.model.source.Source
getAttributionsCollapsible, getProjection, setAttributionsCollapsible, setProjectionMethods 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, unmarkDirtyInDepth
-
Constructor Details
-
OsmSource
public OsmSource()
-
-
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
-
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
- 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
-
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
-
getCrossOrigin
- Specified by:
getCrossOriginin interfaceHasCrossOrigin- Overrides:
getCrossOriginin classTileImageSource- Returns:
- cross-origin or
nullif not set
-
setCrossOrigin
Sets the crossOrigin attribute for loaded images.Note, crossOrigin is set only at creation time and cannot be changed at runtime.
For more details see: OSM 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
Sets whether the layer is opaque. The default value istrue.Note, opaque attribute is set only at creation time and cannot be changed at runtime.
For more details see: OSM docs
- 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. The default value ishttps://tile.openstreetmap.org/{z}/{x}/{y}.png.For more details see OSM docs
- Specified by:
setUrlin interfaceHasUrl- Overrides:
setUrlin classUrlTileSource- Parameters:
url- url template to set
-
withUrl
SeesetUrl(String).- Parameters:
url- url template to set- Returns:
- current instance
-