gws.lib.mapserver.core¶
Source code: gws.lib.mapserver.core
Module Contents¶
- class gws.lib.mapserver.core.Map(config: str = '')¶
MapServer map object wrapper.
- mapObj: mapscript.mapObj¶
- add_layer(opts: gws.MapServerLayerOptions) mapscript.layerObj¶
Adds a layer to the map.
- add_layer_from_config(config: str) mapscript.layerObj¶
Adds a layer to the map using a configuration string.
- draw(bounds: gws.Bounds, size: gws.Size) gws.Image¶
Renders the map within the given bounds and size.
- Parameters:
bounds – The spatial extent to render.
size – The output image size.
- Returns:
The rendered map image.
- style_symbol(style: gws.StyleValues) mapscript.styleObj¶
- to_string() str¶
Converts the map object to a configuration string.
- gws.lib.mapserver.core.new_map(config: str = '') Map¶
Creates a new Map instance from a Mapfile string.
- gws.lib.mapserver.core.version() str¶
Returns the MapServer version string.