Skip to content

Commit

Permalink
Update default map server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinnkunn committed Oct 9, 2024
1 parent 6b12a23 commit 2915b82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion build_website.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 3 additions & 3 deletions map/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand Down

0 comments on commit 2915b82

Please sign in to comment.