gis.integration =============== .. py:module:: gis.integration Classes ------- .. autoapisummary:: gis.integration.MapboxApp Functions --------- .. autoapisummary:: gis.integration.get_js_path gis.integration.get_css_path gis.integration.get_leaflet_asset gis.integration.get_proj4js_asset gis.integration.get_geo_mapbox gis.integration.get_geo_vermessungsamt_winterthur gis.integration.get_geo_zugmap_basisplan gis.integration.get_geo_zugmap_orthofoto gis.integration.get_geo_bs gis.integration.get_geo_admin gis.integration.get_geo_admin_aerial gis.integration.inject_mapbox_api_token_tween_factory Module Contents --------------- .. py:class:: MapboxApp Bases: :py:obj:`more.webassets.WebassetsApp` Provides mapbox integration :class:`onegov.core.framework.Framework` based applications. Doesn't do much except serve the mapbox public token, so we can store it in configuration and not with the source. Not that this token is inherently unsafe and must be the *public* token. Do not use private tokens! If we wanted to avoid this we would have to use a mapbox proxy server, which seems a bit too much. If we detect abuse of the public token we just switch to a new one. If it must be we can even automatically rotate the token regularly. .. py:method:: configure_mapbox(*, mapbox_token: str | None = None, **cfg: Any) -> None Configures the mapbox. The following configuration options are accepted: :mapbox_token: The public mapbox token to be used for the mapbox api. .. py:function:: get_js_path() -> str .. py:function:: get_css_path() -> str .. py:function:: get_leaflet_asset() -> collections.abc.Iterator[str] .. py:function:: get_proj4js_asset() -> collections.abc.Iterator[str] .. py:function:: get_geo_mapbox() -> collections.abc.Iterator[str] .. py:function:: get_geo_vermessungsamt_winterthur() -> collections.abc.Iterator[str] .. py:function:: get_geo_zugmap_basisplan() -> collections.abc.Iterator[str] .. py:function:: get_geo_zugmap_orthofoto() -> collections.abc.Iterator[str] .. py:function:: get_geo_bs() -> collections.abc.Iterator[str] .. py:function:: get_geo_admin() -> collections.abc.Iterator[str] .. py:function:: get_geo_admin_aerial() -> collections.abc.Iterator[str] .. py:function:: inject_mapbox_api_token_tween_factory(app: MapboxApp, handler: collections.abc.Callable[[onegov.core.request.CoreRequest], webob.response.Response]) -> collections.abc.Callable[[onegov.core.request.CoreRequest], webob.response.Response]