Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current used Default Basemap is not going to be avaliable from 31. October #317

Closed
MarijaKnezevic opened this issue Oct 13, 2023 · 5 comments
Assignees

Comments

@MarijaKnezevic
Copy link

MarijaKnezevic commented Oct 13, 2023

Currently used basemap (Stamen Terrain) is not going to be avaliable from 31. October 2023 (see attached image).

Stamen-backgroundmap

Could it be updated so that by default the other basemap is used? (e.g. OpenStreetMap https://tile.openstreetmap.org/${z}/${x}/${y}.png ; Tile Usage Policy or some other map)?

@EricSoroos
Copy link

The option that we're using is going with stadiamaps, the service that's taken over this tile style. -- though it's not going to work without at least a free account.

Once you have an account and add a domain to it, it is a drop-in replacement with some ckan.ini additions:

ckanext.spatial.common_map.custom.url =  https://tiles-eu.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}@2x.png
ckanext.spatial.common_map.type = custom
ckanext.spatial.common_map.attribution = Map tiles by <a href="https://www.stadiamaps.com" target="_blank">Stadia Maps</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.

@amercader
Copy link
Member

The bottom line is that currently there is no service that we can add as default that won't require some form of configuration by the user, which was the main selling point of the Stamen tiles. My plan going forward is to:

  1. Not set any background tiles by default and clearly mark to the user that they should (see below)
  2. Make really easy to choose and configure a provider, rather than the current cumbersome config system. For this I'll integrate the leaflet-providers plugin so we can add any of the providers they support with just two/three config options (type and API key)
  3. Keep existing options for backwards compatibility.

It's nice to get a map with zero config but sadly that's no longer possible, so I think that's the best experience for new users.
I'll send a PR briefly.

Screenshot 2023-10-26 at 12-57-05 Dataset - CKAN

@mmdolbow
Copy link
Contributor

Just want to comment for anyone else looking to patch immediately with their .ini file configuration, when I attempted this at first by placing the configuration at the end, the update didn't work. Putting the config in the middle of the file, between Front-End settings and Internationalization, worked. (Sorry if that's a noob mistake.)

I used the Esri WorldTopoMap, since we have Esri licensing.

ckanext.spatial.common_map.custom.url = https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}.jpg

@amercader
Copy link
Member

I just released ckanext-spatial 2.1.0 which adds support for may different tile providers via Leaflet-providers. Please check the documentation for details on how to configure your map widgets and avoid the Stamen error tiles when using the old default tiles:

https://docs.ckan.org/projects/ckanext-spatial/en/latest/map-widgets.html

@amercader
Copy link
Member

@mmdolbow no need to apologize, it's easy to get confused by this!

All CKAN settings, including the ckanext.spatial.* ones should be placed inside the [app:main] section, i.e. before the [loggers] one in the ini file

@amercader amercader pinned this issue Oct 31, 2023
amercader added a commit to ckan/ckanext-geoview that referenced this issue Nov 17, 2023
scastineyras pushed a commit to OpenGov-OpenData/ckanext-geoview that referenced this issue Jul 12, 2024
* WMTS preview: support webassets

* Add on_same_domain check to WMTS and Shapefile viewer

* Bump version

* Add initial test support

* Clean unnecessary fixture

* Replace deprecated url helper

* Add basic test for geojson_view

* Use plugins.toolkit

* Clean unnecesary requirement

* Clean README

* Add shp test

* Use plugins.toolkit

* Add dev-requirements.txt

* Test support for older versions

* Check response body

* Use ckan toolkit instead

* Use toolkit instead of core methods

* Don't assume format field is there

* Bump version

* use `theme` instead of `main_css` in CKAN >=2.9.6

* Migrate CSS to BS5 badges

* Drop tests for unsupported CKAN versions

* Support multiple tile providers, remove Stamen tiles

Copied the same functionality from ckanext-spatial to leverage
leaflet-providers:

ckan/ckanext-spatial#317

https://docs.ckan.org/projects/ckanext-spatial/en/latest/map-widgets.html

* Bump version

* Add leaflet-providers to webassets and attributionControl to JS modules

* Test 2.11

* Add leaflet-providers.js

---------

Co-authored-by: Sol Lee <[email protected]>
Co-authored-by: Adrià Mercader <[email protected]>
Co-authored-by: pdelboca <[email protected]>
Co-authored-by: Sergey Motornyuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants