From 2915b82871c44e49bb4fb512cf89516e0a07ce00 Mon Sep 17 00:00:00 2001 From: Jinkun Chen Date: Wed, 9 Oct 2024 12:27:51 -0300 Subject: [PATCH] Update default map server --- build_website.sh | 4 +++- map/constants.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build_website.sh b/build_website.sh index 0fb0e4c..6f81124 100755 --- a/build_website.sh +++ b/build_website.sh @@ -1,4 +1,6 @@ #!/bin/bash +cargo install wasm-opt --locked # make sure wasm-opt is installed + SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" ROOTDIR="${SCRIPTPATH}/.." PKGDIR="${ROOTDIR}/aisdb" @@ -51,7 +53,7 @@ npx vite build --outDir "${MAPDIR}/../dist_map" #zip -ru9 aisdb_web/dist_map.zip aisdb_web/dist_map/ VITE_BINGMAPTILES=1 \ -VITE_TILESERVER=aisdb.meridian.cs.dal.ca \ +VITE_TILESERVER=a.tile.openstreetmap.org \ VITE_DISABLE_SSL_DB=1 \ VITE_DISABLE_STREAM=1 \ VITE_AISDBHOST=localhost \ diff --git a/map/constants.js b/map/constants.js index 3472cda..21a2673 100644 --- a/map/constants.js +++ b/map/constants.js @@ -17,9 +17,9 @@ if (database_port === undefined) { } let tileserver_hostname = import.meta.env.VITE_TILESERVER; -if (tileserver_hostname === undefined) { - console.log('tileserver hostname undefined, defaulting to localhost'); - tileserver_hostname = 'localhost'; +if (tileserver_hostname === undefined || tileserver_hostname === null || tileserver_hostname === '') { + console.log('tileserver hostname undefined, defaulting to openstreetmap'); + tileserver_hostname = 'https://a.tile.openstreetmap.org'; } /**