:tocdepth: 3 :py:mod:`gws.base.layer` ======================== .. py:module:: gws.base.layer .. autoapi-nested-parse:: Base Layer object. **Source code:** :source:`gws.base.layer` Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 core/index.rst group/index.rst image/index.rst ows/index.rst tree/index.rst util/index.rst vector/index.rst Package Contents ---------------- .. py:class:: CacheConfig(*args, **kwargs) Bases: :py:obj:`gws.Config` Cache configuration .. py:attribute:: maxAge :type: gws.Duration :value: '7d' Cache max. age. .. py:attribute:: maxLevel :type: int :value: 1 Max. zoom level to cache. .. py:attribute:: requestBuffer :type: Optional[int] Pixel buffer for tile requests. .. py:attribute:: requestTiles :type: Optional[int] Number of tiles to request at once. .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.ConfigWithAccess` Layer configuration .. py:attribute:: cache :type: Optional[CacheConfig] Cache configuration. .. py:attribute:: clientOptions :type: Optional[ClientOptions] Options for the layer display in the client. .. py:attribute:: cssSelector :type: str :value: '' Css selector for feature layers. .. py:attribute:: display :type: gws.LayerDisplayMode Layer display mode. .. py:attribute:: extent :type: Optional[gws.Extent] Layer extent. .. py:attribute:: extentBuffer :type: Optional[int] Extent buffer. .. py:attribute:: finders :type: Optional[list[gws.ext.config.finder]] Search providers. .. py:attribute:: grid :type: Optional[GridConfig] Client grid. .. py:attribute:: imageFormat :type: Optional[gws.lib.image.FormatConfig] Image format. .. py:attribute:: legend :type: Optional[gws.ext.config.legend] Legend configuration. .. py:attribute:: loadingStrategy :type: gws.FeatureLoadingStrategy Feature loading strategy. .. py:attribute:: metadata :type: Optional[gws.base.metadata.Config] Layer metadata. .. py:attribute:: models :type: Optional[list[gws.ext.config.model]] Data models. .. py:attribute:: opacity :type: float :value: 1 Layer opacity. .. py:attribute:: ows :type: Optional[Config.ows] Configuration for OWS services. .. py:attribute:: templates :type: Optional[list[gws.ext.config.template]] Layer templates. .. py:attribute:: title :type: str :value: '' Layer title. .. py:attribute:: withCache :type: Optional[bool] :value: False Layer is cached. .. py:attribute:: withLegend :type: Optional[bool] :value: True Layer has a legend. .. py:attribute:: withOws :type: Optional[bool] :value: True Layer is enabled for OWS services. .. py:attribute:: withSearch :type: Optional[bool] :value: True Layer is searchable. .. py:attribute:: zoom :type: Optional[gws.gis.zoom.Config] Layer resolutions and scales. .. py:attribute:: zoomExtent :type: Optional[gws.Extent] Layer zoom extent. (added in 8.1) .. py:class:: GridConfig(*args, **kwargs) Bases: :py:obj:`gws.Config` Grid configuration for caches and tiled data .. py:attribute:: crs :type: Optional[gws.CrsName] Target CRS for the grid. .. py:attribute:: extent :type: Optional[gws.Extent] Target extent for the grid. .. py:attribute:: origin :type: Optional[gws.Origin] Grid origin, defaults to north-west. .. py:attribute:: resolutions :type: Optional[list[float]] Grid resolutions, defaults to parent layer resolutions. .. py:attribute:: tileSize :type: Optional[int] Tile size in pixels, defaults to 256. .. py:class:: Object Bases: :py:obj:`gws.Layer` Layer object. .. py:attribute:: canRenderBox :value: False .. py:attribute:: canRenderSvg :value: False .. py:attribute:: canRenderXyz :value: False .. py:attribute:: clientOptions :type: gws.LayerClientOptions .. py:attribute:: cssSelector :type: str .. py:attribute:: hasLegend :value: False .. py:attribute:: isEnabledForOws :value: False .. py:attribute:: isGroup :value: False .. py:attribute:: isSearchable :value: False .. py:attribute:: parent :type: gws.Layer Parent object. .. py:attribute:: parentBounds :type: gws.Bounds .. py:attribute:: parentResolutions :type: list[float] .. py:method:: ancestors() .. py:method:: configure() Configuration hook. .. py:method:: configure_bounds() .. py:method:: configure_cache() .. py:method:: configure_grid() .. py:method:: configure_group_layers(layer_configs) .. py:method:: configure_layer() Layer configuration protocol. .. py:method:: configure_legend() .. py:method:: configure_metadata() .. py:method:: configure_models() .. py:method:: configure_ows() .. py:method:: configure_provider() .. py:method:: configure_resolutions() .. py:method:: configure_search() .. py:method:: configure_sources() .. py:method:: configure_templates() .. py:method:: configure_zoom_bounds() .. py:method:: descendants() .. py:method:: find_features(search, user) .. py:method:: mapproxy_config(mc) .. py:method:: post_configure() Post-configuration hook. .. py:method:: props(user) Generate a ``Props`` struct for this object. :param user: The user for which the props should be generated. .. py:method:: render(lri) .. py:method:: render_legend(args=None) -> Optional[gws.LegendRenderOutput] .. py:method:: url_path(kind) .. py:class:: Props(*args, **kwargs) Bases: :py:obj:`gws.Props` Object properties. .. py:attribute:: clientOptions :type: gws.LayerClientOptions .. py:attribute:: cssSelector :type: str .. py:attribute:: displayMode :type: str .. py:attribute:: extent :type: Optional[gws.Extent] .. py:attribute:: geometryType :type: Optional[gws.GeometryType] .. py:attribute:: grid :type: GridProps .. py:attribute:: layers :type: Optional[list[Props]] .. py:attribute:: loadingStrategy :type: gws.FeatureLoadingStrategy .. py:attribute:: metadata :type: gws.base.metadata.Props .. py:attribute:: model :type: Optional[gws.base.model.Props] .. py:attribute:: opacity :type: Optional[float] .. py:attribute:: resolutions :type: Optional[list[float]] .. py:attribute:: title :type: str :value: '' .. py:attribute:: type :type: str .. py:attribute:: uid :type: str Unique ID. .. py:attribute:: url :type: str :value: '' .. py:attribute:: zoomExtent :type: Optional[gws.Extent]