:tocdepth: 3 :py:mod:`gws.gis.zoom` ====================== .. py:module:: gws.gis.zoom **Source code:** :source:`gws.gis.zoom` Package Contents ---------------- .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.Config` Zoom levels and resolutions .. py:attribute:: initResolution :type: Optional[float] Initial resolution. .. py:attribute:: initScale :type: Optional[float] Initial scale. .. py:attribute:: maxResolution :type: Optional[float] Maximal resolution. .. py:attribute:: maxScale :type: Optional[float] Maximal scale. .. py:attribute:: minResolution :type: Optional[float] Minimal resolution. .. py:attribute:: minScale :type: Optional[float] Minimal scale. .. py:attribute:: resolutions :type: Optional[list[float]] Allowed resolutions. .. py:attribute:: scales :type: Optional[list[float]] Allowed scales. .. py:function:: init_resolution(cfg, resolutions: list) -> float Returns the initial resolution. :param cfg: A config. :param resolutions: List of Resolutions. .. py:data:: OSM_RESOLUTIONS Resolutions corresponding to OSM zoom levels. .. py:data:: OSM_SCALES :value: [500000000, 250000000, 150000000, 70000000, 35000000, 15000000, 10000000, 4000000, 2000000,... //wiki.openstreetmap.org/wiki/Zoom_levels) :type: Scales corresponding to OSM zoom levels. (https .. py:function:: resolutions_from_bounds(b: gws.Bounds, tile_size: int) -> list[float] Loads resolutions from bounds. :param b: Bounds object. :param tile_size: The tile size. :returns: A list of resolutions. .. py:function:: resolutions_from_config(cfg, parent_resolutions: list[float] = None) -> list[float] Loads resolution from a config. :param cfg: A config. :param parent_resolutions: List of parent resolutions. :returns: A list of resolutions. .. py:function:: resolutions_from_source_layers(source_layers: list[gws.SourceLayer], parent_resolutions: list[float]) -> list[float] Loads resolution from a source layers. :param source_layers: Source layers. :param parent_resolutions: List of parent resolutions. :returns: A list of resolutions.