:tocdepth: 3 :py:mod:`gws.lib.mapserver.core` ================================ .. py:module:: gws.lib.mapserver.core **Source code:** :source:`gws.lib.mapserver.core` Module Contents --------------- .. py:exception:: Error Bases: :py:obj:`gws.Error` Generic GWS error. .. py:class:: Map(config: str = '') MapServer map object wrapper. .. py:attribute:: mapObj :type: mapscript.mapObj .. py:method:: add_layer(opts: gws.MapServerLayerOptions) -> mapscript.layerObj Adds a layer to the map. .. py:method:: add_layer_from_config(config: str) -> mapscript.layerObj Adds a layer to the map using a configuration string. .. py:method:: copy() -> Map Creates a copy of the current map object. .. py:method:: draw(bounds: gws.Bounds, size: gws.Size) -> gws.Image Renders the map within the given bounds and size. :param bounds: The spatial extent to render. :param size: The output image size. :returns: The rendered map image. .. py:method:: style_symbol(style: gws.StyleValues) -> mapscript.styleObj .. py:method:: to_string() -> str Converts the map object to a configuration string. .. py:function:: new_map(config: str = '') -> Map Creates a new Map instance from a Mapfile string. .. py:function:: version() -> str Returns the MapServer version string.