Skip to content

Commit

Permalink
update default map tile server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinnkunn committed Oct 9, 2024
1 parent 2915b82 commit 26272ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions build_website.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/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 @@ -44,7 +42,7 @@ npm --prefix "${ROOTDIR}/aisdb_web" install
#VITE_TILESERVER=$VITE_TILESERVER \

#VITE_BINGMAPTILES=\
#VITE_TILESERVER=\
VITE_TILESERVER= a.tile.openstreetmap.org \
VITE_DISABLE_SSL_DB=1 \
VITE_DISABLE_STREAM=1 \
VITE_AISDBHOST=localhost \
Expand All @@ -53,7 +51,7 @@ npx vite build --outDir "${MAPDIR}/../dist_map"
#zip -ru9 aisdb_web/dist_map.zip aisdb_web/dist_map/

VITE_BINGMAPTILES=1 \
VITE_TILESERVER=a.tile.openstreetmap.org \
VITE_TILESERVER=dev.virtualearth.net \
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 || tileserver_hostname === null || tileserver_hostname === '') {
console.log('tileserver hostname undefined, defaulting to openstreetmap');
tileserver_hostname = 'https://a.tile.openstreetmap.org';
if (tileserver_hostname === undefined) {
console.log('tileserver hostname undefined, defaulting to localhost');
tileserver_hostname = 'localhost';
}

/**
Expand Down

0 comments on commit 26272ce

Please sign in to comment.