Skip to content

Commit

Permalink
Merge pull request #1151 from GSA/map-for-local
Browse files Browse the repository at this point in the history
local docker map tiles
  • Loading branch information
FuhuXia authored Nov 16, 2023
2 parents 15c6bae + 44fa00a commit f361f1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
13 changes: 6 additions & 7 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,13 @@ 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=<a href=https://openstreetmap.org/>OpenStreetMap</a> contributors
# map tile servers options are described at
# https://github.com/GSA/data.gov/issues/4493#issuecomment-1791347298

# 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 <a href="https://usgs.gov/">U.S. Geological Survey</a>

CKANEXT__SPATIAL__COMMON_MAP__CUSTOM_URL=https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION=<a href=https://stadiamaps.com/>Stadia Maps</a>. <a href=https://openstreetmap.org/>OpenStreetMap</a> contributors
# 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=<a href=https://openstreetmap.org/>OpenStreetMap</a> contributors

CKAN___GOOGLEANALYTICS__ID=UA-00000000-0
CKAN__TRACKING_ENABLED=true
Expand Down
14 changes: 10 additions & 4 deletions ckan/setup/ckan.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> 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 = <a href=https://stadiamaps.com/>Stadia Maps</a>. <a href=https://openstreetmap.org/>OpenStreetMap</a> 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 <a href="https://usgs.gov/">U.S. Geological Survey</a>

# ckanext.spatial.common_map.custom_url = https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}{r}.png
# ckanext.spatial.common_map.attribution = <a href=https://stadiamaps.com/>Stadia Maps</a>. <a href=https://openstreetmap.org/>OpenStreetMap</a> 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 = <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors

## Harvest settings
# ckanext-harvest will use ckan.redis.url if redis configuration
Expand Down

0 comments on commit f361f1b

Please sign in to comment.