:tocdepth: 3 :py:mod:`gws.gis.mpx` ===================== .. py:module:: gws.gis.mpx .. autoapi-nested-parse:: MapProxy integration module for GWS. This module provides functions to interact with MapProxy services for WMS and WMTS requests. **Source code:** :source:`gws.gis.mpx` Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 config/index.rst util/index.rst wsgi_main/index.rst Package Contents ---------------- .. py:exception:: ServiceException Bases: :py:obj:`Exception` Exception raised when a MapProxy service request fails. .. py:function:: wms_request(layer_uid: str, bounds: gws.Bounds, width: int, height: int, forward: Optional[Dict[str, Any]] = None) -> Optional[bytes] Make a WMS GetMap request to MapProxy. :param layer_uid: The layer identifier. :param bounds: The bounding box for the map. :param width: The width of the requested image in pixels. :param height: The height of the requested image in pixels. :param forward: Additional parameters to forward to the WMS request. :returns: The image content as bytes if successful, None if the request fails. .. py:function:: wmts_request(source_uid: str, x: int, y: int, z: int, tile_matrix: str, tile_size: int) -> Optional[bytes] Make a WMTS GetTile request to MapProxy. :param source_uid: The source layer identifier. :param x: The tile column. :param y: The tile row. :param z: The zoom level. :param tile_matrix: The tile matrix set identifier. :param tile_size: The size of the tile in pixels. :returns: The tile image content as bytes if successful, None if the request fails.