gws.base.layer

Base Layer object.

Source code: gws.base.layer

Submodules

Package Contents

class gws.base.layer.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.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.

ows: Config.ows | None

Configuration for OWS services.

templates: list[gws.ext.config.template] | None

Layer templates.

title: str = ''

Layer title.

withCache: bool | None = False

Layer is cached.

withLegend: bool | None = True

Layer has a legend.

withOws: bool | None = True

Layer is enabled for OWS services.

withSearch: bool | None = True

Layer is searchable.

zoom: gws.gis.zoom.Config | None

Layer resolutions and scales.

class gws.base.layer.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.Object

Bases: gws.Layer

Layer object.

canRenderBox = False
canRenderSvg = False
canRenderXyz = False
clientOptions: gws.LayerClientOptions
cssSelector: str
hasLegend = False
isEnabledForOws = False
isGroup = False
isSearchable = False
parent: gws.Layer
parentBounds: gws.Bounds
parentResolutions: list[float]
ancestors()
configure()

Configuration hook.

configure_bounds()
configure_cache()
configure_grid()
configure_group_layers(layer_configs)
configure_layer()

Layer configuration protocol.

configure_legend()
configure_metadata()
configure_models()
configure_ows()
configure_provider()
configure_resolutions()
configure_sources()
configure_templates()
descendants()
find_features(search, user)
mapproxy_config(mc)
post_configure()

Post-configuration hook.

props(user)

Generate a Props struct for this object.

Parameters:

user – The user for which the props should be generated.

render(lri)
render_legend(args=None) gws.LegendRenderOutput | None
url_path(kind)
class gws.base.layer.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

clientOptions: gws.LayerClientOptions
cssSelector: str
displayMode: str
extent: gws.Extent | None
geometryType: gws.GeometryType | None
grid: GridProps
layers: list[Props] | 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 = ''