From ac86cde87cfc02a8350800fc51551e7a927d11ef Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Thu, 16 Nov 2023 12:07:02 -0500 Subject: [PATCH 1/2] local docker map tiles --- .env | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 59ad076f..a197af83 100644 --- a/.env +++ b/.env @@ -74,14 +74,14 @@ CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox # Customize map widget CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom -# CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tile.openstreetmap.org/{z}/{x}/{y}.png -# CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=OpenStreetMap contributors +CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tile.openstreetmap.org/{z}/{x}/{y}.png +CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=OpenStreetMap contributors # CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x} # CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=Tiles courtesy of the U.S. Geological Survey -CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png -CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=Stadia Maps. OpenStreetMap contributors +# CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png +# CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=Stadia Maps. OpenStreetMap contributors CKAN___GOOGLEANALYTICS__ID=UA-00000000-0 CKAN__TRACKING_ENABLED=true From 44fa00a432f2e3350b526a5c71784c7f30997000 Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Thu, 16 Nov 2023 13:29:24 -0500 Subject: [PATCH 2/2] add comments --- .env | 11 +++++------ ckan/setup/ckan.ini | 14 ++++++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.env b/.env index a197af83..f7a44568 100644 --- a/.env +++ b/.env @@ -74,15 +74,14 @@ CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox # Customize map widget CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom +# map tile servers options are described at +# https://github.com/GSA/data.gov/issues/4493#issuecomment-1791347298 + +# it is ok to use any of the three options for development purpose without +# worrying about the tile server usage limits or CDN caching CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tile.openstreetmap.org/{z}/{x}/{y}.png CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=OpenStreetMap contributors -# CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x} -# CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=Tiles courtesy of the U.S. Geological Survey - -# CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png -# CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=Stadia Maps. OpenStreetMap contributors - CKAN___GOOGLEANALYTICS__ID=UA-00000000-0 CKAN__TRACKING_ENABLED=true diff --git a/ckan/setup/ckan.ini b/ckan/setup/ckan.ini index a32b8e89..c4e9ebd3 100644 --- a/ckan/setup/ckan.ini +++ b/ckan/setup/ckan.ini @@ -232,14 +232,20 @@ ckanext.spatial.search_backend = solr-bbox # Customize map widget ckanext.spatial.common_map.type = custom -ckanext.spatial.common_map.custom_url = /maptiles/{z}/{x}/{y}.png -ckanext.spatial.common_map.attribution = OpenStreetMap contributors +# three map tile servers options are described at +# https://github.com/GSA/data.gov/issues/4493#issuecomment-1791347298 + +# otpion 1: paid service +# ckanext.spatial.common_map.custom_url = https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png +# ckanext.spatial.common_map.attribution = Stadia Maps. OpenStreetMap contributors +# option 2: free .gov service but less zoom levels # ckanext.spatial.common_map.custom_url = https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x} # ckanext.spatial.common_map.attribution = Tiles courtesy of the U.S. Geological Survey -# ckanext.spatial.common_map.custom_url = https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png -# ckanext.spatial.common_map.attribution = Stadia Maps. OpenStreetMap contributors +# option 3: free .org service with CND caching to reduce load on the server +ckanext.spatial.common_map.custom_url = /maptiles/{z}/{x}/{y}.png +ckanext.spatial.common_map.attribution = OpenStreetMap contributors ## Harvest settings # ckanext-harvest will use ckan.redis.url if redis configuration