gws.base.map.core¶
Default map object.
Source code: gws.base.map.core
Module Contents¶
- class gws.base.map.core.Config(*args, **kwargs)¶
Bases:
gws.ConfigMap with its layers, extent, CRS and zoom levels.
- crs: gws.CrsName | None = 'EPSG:3857'¶
CRS of the map and its layers.
- extent: gws.Extent | None¶
Map extent in map CRS coordinates.
- layers: list[gws.ext.config.layer]¶
Map layers.
- zoom: gws.gis.zoom.Config | None¶
Allowed scales or zoom levels and the initial zoom.
- class gws.base.map.core.Object¶
Bases:
gws.MapDefault map.
- configure()¶
Configuration hook.
Called when the node is initialized. Raising an exception here aborts the creation of the node.
- props(user)¶
Generate a
Propsstruct for this object.Do not call this method directly, use
gws.props_ofinstead, which also checks permissions.- Parameters:
user – The user for which the props should be generated.
- Returns:
A
Propsobject or a dict. Nested objects are converted to props as well.
- class gws.base.map.core.Props(*args, **kwargs)¶
Bases:
gws.DataBasic data object.
This object can be instantiated by passing one or more
dictorDataarguments and/or keyword args. All keys and keywords become attributes of the object.Accessing an undefined attribute returns
Noneand no error is raised, unless the attribute name starts with an underscore.Example:
d = gws.Data({'a': 1}, b=2) d.a # 1 d['b'] # 2 d.c # None
- extent: gws.Extent¶
- rootLayer: gws.base.layer.Props¶