ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
126 stars 193 forks source link

The datapreview map used by ckanext geoview does not work after changing ckanext.spatial.common_map.type either to custom or to another map.type #325

Open diegom22 opened 8 months ago

diegom22 commented 8 months ago

There is an issue where there config for ckanext-geoview preview dataset map interferes with the mapwidget on setting ckanext.spatial.common_map.type configuration in the ckan.ini. Is it possible to set the default map as OpenStreet maps (https://tile.openstreetmap.org/{z}/{x}/{y}.png) for both the maps. This issue started after the removal of Stamen terrain tiles as the default map

emiliopardo commented 1 month ago

I have the same problem. If I active in de ckan.ini

; ckanext.spatial.common_map.type = custom
; ckanext.spatial.common_map.custom_url = https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
; ckanext.spatial.common_map.attribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'

I can see the base map in Filter localtion and Dataset Extent, but I can´t see base map in resource views like geo_view or geojson_view

I'm installing from source in a custom dockerfile ``

ckanext-spatial

RUN apt-get update && \ apt-get install -y gdal-bin python3-gdal libpq-dev RUN pip install -e git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial RUN pip install -r https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt

ckanext-geoview

RUN pip install -e git+https://github.com/ckan/ckanext-geoview.git#egg=ckanext-geoview RUN pip install -r https://raw.githubusercontent.com/ckan/ckanext-geoview/master/dev-requirements.txt ``

any idea?

emiliopardo commented 1 month ago

I have resolved the issue by following the instructions from the ckanext-geoview repository to configure multiple basemaps.

For this, it is necessary to create a basemaps.json file and place it in the same location as production.ini.

With this modification, the configured basemap (the first one) is now visible, but it is not possible to select between different basemaps.