gws.base.layer.core
¶
Base layer object.
Source code: gws.base.layer.core
Module Contents¶
- gws.base.layer.core.DEFAULT_TILE_SIZE = 256¶
- class gws.base.layer.core.CacheConfig(*args, **kwargs)¶
Bases:
gws.Config
Cache configuration
- maxAge: gws.Duration = '7d'¶
cache max. age
- maxLevel: int = 1¶
max. zoom level to cache
- requestBuffer: int | None¶
- requestTiles: int | None¶
- class gws.base.layer.core.GridConfig(*args, **kwargs)¶
Bases:
gws.Config
Grid configuration for caches and tiled data
- crs: gws.CrsName | None¶
- extent: gws.Extent | None¶
- origin: gws.Origin | None¶
- resolutions: list[float] | None¶
- tileSize: int | None¶
- class gws.base.layer.core.AutoLayersOptions(*args, **kwargs)¶
Bases:
gws.ConfigWithAccess
Configuration for automatic layers.
- applyTo: gws.gis.source.LayerFilter | None¶
- config: dict¶
- class gws.base.layer.core.OwsConfig(*args, **kwargs)¶
Bases:
gws.Config
Object configuration.
- layerName: str = ''¶
- featureName: str = ''¶
- geometryName: str = ''¶
- xmlNamespace: gws.XmlNamespace | None¶
- class gws.base.layer.core.ClientOptions(*args, **kwargs)¶
Bases:
gws.Data
Client options for a layer
- expanded: bool = False¶
the layer is expanded in the list view
- unlisted: bool = False¶
the layer is hidden in the list view
- selected: bool = False¶
the layer is initially selected
the layer is initially hidden
- unfolded: bool = False¶
the layer is not listed, but its children are
- exclusive: bool = False¶
only one of this layer’s children is visible at a time
- class gws.base.layer.core.Config(*args, **kwargs)¶
Bases:
gws.ConfigWithAccess
Layer configuration
- cache: CacheConfig | None¶
cache configuration
- clientOptions: ClientOptions¶
options for the layer display in the client
- cssSelector: str = ''¶
css selector for feature layers
- display: gws.LayerDisplayMode¶
layer display mode
- extent: gws.Extent | None¶
layer extent
- extentBuffer: int | None¶
extent buffer
- finders: list[gws.ext.config.finder] | None¶
search providers
- grid: GridConfig | None¶
client grid
- imageFormat: gws.ImageFormat¶
image format
- legend: gws.ext.config.legend | None¶
legend configuration
- loadingStrategy: gws.FeatureLoadingStrategy¶
feature loading strategy
- metadata: gws.Metadata | None¶
layer metadata
- models: list[gws.ext.config.model] | None¶
data models
- opacity: float = 1¶
layer opacity
- templates: list[gws.ext.config.template] | None¶
layer templates
- title: str = ''¶
layer title
- zoom: gws.gis.zoom.Config | None¶
layer resolutions and scales
- withSearch: bool | None = True¶
layer is searchable
- withLegend: bool | None = True¶
layer has a legend
- withCache: bool | None = False¶
layer is cached
- withOws: bool | None = True¶
layer is enabled for OWS services
- class gws.base.layer.core.GridProps(*args, **kwargs)¶
Bases:
gws.Props
Object properties.
- origin: str¶
- extent: gws.Extent¶
- resolutions: list[float]¶
- tileSize: int¶
- class gws.base.layer.core.Props(*args, **kwargs)¶
Bases:
gws.Props
Object properties.
- clientOptions: gws.LayerClientOptions¶
- cssSelector: str¶
- displayMode: str¶
- extent: gws.Extent | None¶
- geometryType: gws.GeometryType | None¶
- loadingStrategy: gws.FeatureLoadingStrategy¶
- metadata: gws.lib.metadata.Props¶
- model: gws.base.model.Props | None¶
- opacity: float | None¶
- resolutions: list[float] | None¶
- title: str = ''¶
- type: str¶
- uid: str¶
- url: str = ''¶
- class gws.base.layer.core.Object¶
Bases:
gws.Layer
Layer object.
- clientOptions: gws.LayerClientOptions¶
- cssSelector: str¶
- canRenderBox = False¶
- canRenderSvg = False¶
- canRenderXyz = False¶
- isEnabledForOws = False¶
- isGroup = False¶
- isSearchable = False¶
- hasLegend = False¶
- parentBounds: gws.Bounds¶
- parentResolutions: list[float]¶
- configure()¶
Configuration hook.
- configure_layer()¶
Layer configuration protocol.
- configure_bounds()¶
- configure_cache()¶
- configure_grid()¶
- configure_legend()¶
- configure_metadata()¶
- configure_models()¶
- configure_provider()¶
- configure_resolutions()¶
- configure_search()¶
- configure_sources()¶
- configure_templates()¶
- configure_group_layers(layer_configs)¶
- configure_ows()¶
- post_configure()¶
Post-configuration hook.
- ancestors()¶
- descendants()¶
- url_path(kind)¶
- props(user)¶
Generate a
Props
struct for this object.- Parameters:
user – The user for which the props should be generated.
- render(lri)¶
- get_features_for_view(search, user, view_names=None)¶
- render_legend(args=None) gws.LegendRenderOutput | None ¶
- mapproxy_config(mc)¶