Build with newest nextstrain/ncov has API requests to mapbox 403:Forbidden

@babarlelephant @rsultana I tested this today using auspice customsations and all was working well (instructions below). If this works for you it may be a better solution than modifying the source code, as it should allow easier updates to auspice. If you try this and it doesn’t work, please let me know & I’ll try to fix things!


I started by installing a fresh copy of auspice following our install docs

# Start in an empty directory
conda create --name auspice-test-map-customisations nodejs=14
conda activate auspice-test-map-customisations
npm install --global auspice
auspice --version # version 2.28.0

Following the client customisation docs, create a config.json file, with the following contents (I used @rsultana’s settings from above):

{
  "mapTiles": {
    "api": "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png",
    "attribution": "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
    "mapboxWordmark": false
  }
}

Download a dataset to view in auspice (skip this if you have your own!)

mkdir datasets
curl https://data.nextstrain.org/zika.json --compressed -o datasets/zika.json

Build auspice & view in a browser:

auspice build --verbose --extend config.json # note that this creates `index.html`, `dist` etc in the current directory
auspice view --datasetDir datasets
# Ensure that the message printed by the server as it starts up includes
# "Serving the auspice build which exists in this directory."
# so that we are indeed using our custom build of auspice

Open localhost:4000 in your browser and you should see a map similar to: