Repository navigation
Conversation
The map only offered OpenStreetMap. It now offers a list of base maps that are legal to use in OpenSAK, in a layer switcher at the top right of the map. The map last chosen is remembered. Settings → Map → Base maps switches every map on or off, OpenStreetMap included. OpenStreetMap and OpenTopoMap are on by default. With nothing usable switched on, OpenStreetMap is still shown. - Worldwide, no key: OpenStreetMap, OpenTopoMap, CyclOSM, OSM Humanitarian - National open-data maps, limited to their country: swisstopo (map, aerial), basemap.at (map, aerial), IGN France (map, aerial), PDOK (map, aerial), basemap.de, USGS (topo, aerial) - With the user's own API key, one per provider: Esri World Imagery, MapTiler Satellite and Outdoor, Thunderforest Outdoors and OpenCycleMap. A keyed map is offered only once its key is entered. Google and Bing are left out because their terms forbid direct tile access. Offline (OpenSAK-Org#1111): the new maps share the disk tile cache, each for as long as its provider's cache headers allow. Esri allows caching only while connected, so its tiles are fetched through opensak://tiles/, which Chromium never writes to its HTTP cache. The Esri key also stays out of the page. The privacy policy (§5.1) and the README credits name the new providers. Translations for the 10 non-English languages are machine-made. fixes OpenSAK-Org#747
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
More choices for base maps (#747)
The map only offered OpenStreetMap. This PR adds a choice of base maps, including aerial and satellite imagery, as asked for in #747.
What changes for the user
Maps
Only sources whose terms allow use in an app like OpenSAK are included. Google and Bing are deliberately left out because their terms forbid direct tile access. A keyed map appears only once its key is entered, so the user holds the agreement with that provider.
Offline (#1111)
opensak://tiles/…, which Chromium never writes to its HTTP cache, so they never reach the disk. The Esri key also stays out of the page.max-age).Implementation
gui/map_layers.py(new): the list of maps (URL, attribution, zoom levels, bounds, key provider, offline flag).gui/map_widget.py: builds one tile layer per available map, adds the Leaflet layer switcher, and reports the chosen map back to Python.gui/web_assets.py:opensak://tiles/tile proxy for maps whose provider doesn't allow tiles on the device.gui/settings.py:map_base_layers,map_base_layer,map_api_keys, stored inopensak.json.gui/dialogs/settings_dialog.py: the new Base maps section.PRIVACY_POLICY.md§5.1 and the README credits name the new providers. I didn't change the policy's effective date; please say if it should change.Translations
New and changed texts are in all 11 language files. The 10 non-English translations are machine-made, so corrections from native speakers are welcome.
Testing
tests/unit-tests/test_map_layers_747.py. The full unit suite andmypypass.fixes #747