This commit is contained in:
parent
3fb444fcf6
commit
9989a8d54d
@ -190,7 +190,7 @@ deployment method.
|
|||||||
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
||||||
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
||||||
|
|
||||||
:default: ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``
|
:default: ``https://tile.openstreetmap.org/{z}/{x}/{y}.png``
|
||||||
|
|
||||||
|
|
||||||
.. envvar:: STATICMAP_SUBDOMAINS
|
.. envvar:: STATICMAP_SUBDOMAINS
|
||||||
|
@ -523,7 +523,7 @@ see <a class="reference external" href="https://docs.sqlalchemy.org/en/13/core/p
|
|||||||
</div>
|
</div>
|
||||||
<dl class="field-list simple">
|
<dl class="field-list simple">
|
||||||
<dt class="field-odd">Default<span class="colon">:</span></dt>
|
<dt class="field-odd">Default<span class="colon">:</span></dt>
|
||||||
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png</span></code></p>
|
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">https://tile.openstreetmap.org/{z}/{x}/{y}.png</span></code></p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -190,7 +190,7 @@ deployment method.
|
|||||||
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
||||||
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
||||||
|
|
||||||
:default: ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``
|
:default: ``https://tile.openstreetmap.org/{z}/{x}/{y}.png``
|
||||||
|
|
||||||
|
|
||||||
.. envvar:: STATICMAP_SUBDOMAINS
|
.. envvar:: STATICMAP_SUBDOMAINS
|
||||||
|
@ -516,7 +516,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<dl class="field-list simple">
|
<dl class="field-list simple">
|
||||||
<dt class="field-odd">défaut<span class="colon">:</span></dt>
|
<dt class="field-odd">défaut<span class="colon">:</span></dt>
|
||||||
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png</span></code></p>
|
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">https://tile.openstreetmap.org/{z}/{x}/{y}.png</span></code></p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
@ -4413,7 +4413,7 @@ msgid "Since **0.4.9**, it's also used to generate static maps (to keep default
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../source/installation.rst:193
|
#: ../source/installation.rst:193
|
||||||
msgid "``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
msgid "``https://tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../source/installation.rst:200
|
#: ../source/installation.rst:200
|
||||||
|
@ -4582,7 +4582,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../source/installation.rst:193
|
#: ../source/installation.rst:193
|
||||||
msgid "``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
msgid "``https://tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../source/installation.rst:200
|
#: ../source/installation.rst:200
|
||||||
|
@ -5017,7 +5017,7 @@ msgstr ""
|
|||||||
"`DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)"
|
"`DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)"
|
||||||
|
|
||||||
#: ../source/installation.rst:193
|
#: ../source/installation.rst:193
|
||||||
msgid "``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
msgid "``https://tile.openstreetmap.org/{z}/{x}/{y}.png``"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../source/installation.rst:200
|
#: ../source/installation.rst:200
|
||||||
|
@ -190,7 +190,7 @@ deployment method.
|
|||||||
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
| Tile server URL (with api key if needed), see `Map tile server <installation.html#map-tile-server>`__.
|
||||||
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
| Since **0.4.9**, it's also used to generate static maps (to keep default server, see `DEFAULT_STATICMAP <installation.html#envvar-DEFAULT_STATICMAP>`__)
|
||||||
|
|
||||||
:default: ``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``
|
:default: ``https://tile.openstreetmap.org/{z}/{x}/{y}.png``
|
||||||
|
|
||||||
|
|
||||||
.. envvar:: STATICMAP_SUBDOMAINS
|
.. envvar:: STATICMAP_SUBDOMAINS
|
||||||
|
@ -41,7 +41,7 @@ class BaseConfig:
|
|||||||
TILE_SERVER = {
|
TILE_SERVER = {
|
||||||
'URL': os.environ.get(
|
'URL': os.environ.get(
|
||||||
'TILE_SERVER_URL',
|
'TILE_SERVER_URL',
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
'ATTRIBUTION': os.environ.get(
|
'ATTRIBUTION': os.environ.get(
|
||||||
'MAP_ATTRIBUTION',
|
'MAP_ATTRIBUTION',
|
||||||
|
@ -12,12 +12,12 @@ class TestGetStaticMapTileServerUrl:
|
|||||||
'expected_tile_server_url',
|
'expected_tile_server_url',
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
'',
|
'',
|
||||||
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
'a',
|
'a',
|
||||||
'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
@ -52,7 +52,7 @@ class TestGetStaticMapTileServerUrl:
|
|||||||
def test_it_returns_tile_server_url_with_random_subdomain(self) -> None:
|
def test_it_returns_tile_server_url_with_random_subdomain(self) -> None:
|
||||||
"""in case multiple subdomains are provided"""
|
"""in case multiple subdomains are provided"""
|
||||||
tile_config = {
|
tile_config = {
|
||||||
'URL': 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
'URL': 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
'STATICMAP_SUBDOMAINS': 'a,b,c',
|
'STATICMAP_SUBDOMAINS': 'a,b,c',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user