gws.base.layer

Source code: gws.base.layer

Submodules

Package Contents

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: OwsConfig | None

configuration for OWS services

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.Object

Bases: gws.Layer

Layer object.

parent: gws.Layer
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_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)
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 = ''
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.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