gws.common.layer.layer

class gws.common.layer.layer.Config(*args, **kwargs)[source]

Layer configuration

clientOptions = {}

options for the layer display in the client

dataModel = None

layer data model

display = 'box'

layer display mode

edit = None

editing permissions

extent = None

layer extent

extentBuffer = None

extent buffer

legend = {}

legend configuration

meta = None

layer meta data

opacity = 1

layer opacity

ows = {}

OWS services options

search = {}

layer search configuration

templates = None

client templates

title = ''

layer title

zoom = None

layer resolutions and scales

class gws.common.layer.layer.CustomConfig(*args, **kwargs)[source]

Custom layer configuration

applyTo = None

source layers this configuration applies to

clientOptions = None

options for the layer display in the client

dataModel = None

layer data model

display = None

layer display mode

edit = None

editing permissions

extent = None

layer extent

extentBuffer = None

extent buffer

legend = None

legend configuration

meta = None

layer meta data

opacity = None

layer opacity

ows = None

OWS services options

search = None

layer search configuration

templates = None

client templates

title = None

layer title

zoom = None

layer resolutions and scales

class gws.common.layer.layer.LayerLegend(*args, **kwargs)[source]
class gws.common.layer.layer.Layer[source]
props
description
has_legend
own_bounds
default_search_provider
legend_url
configure()[source]
post_configure()[source]
configure_metadata(provider_meta=None) → gws.types.MetaData[source]

Load metadata from the config or from a provider, whichever comes first.

edit_access(user)[source]
edit_operation(operation: str, feature_props: List[gws.types.FeatureProps]) → List[gws.types.IFeature][source]
props_for(user)[source]
mapproxy_config(mc)[source]
render_box(rv: gws.types.MapRenderView, extra_params=None)[source]
render_xyz(x, y, z)[source]
render_svg(rv: gws.types.MapRenderView, style: gws.types.IStyle = None) → str[source]
render_svg_tags(rv: gws.types.MapRenderView, style: gws.types.IStyle = None) → List[tuple][source]
configure_legend() → gws.types.LayerLegend[source]
render_legend(context=None) → Optional[str][source]

Render a legend and return the path to the legend image.

render_legend_image(context=None) → bytes[source]
render_html_legend(context=None) → str[source]

Render a legend in the html format.

get_features(bounds: gws.types.Bounds, limit: int = 0) → List[gws.types.IFeature][source]
ows_enabled(service: gws.types.IOwsService) → bool[source]