vector tile server (onyx with Azure AD authentication) in development environment.
Please be advised that this repository is for a specific environment. Not for general use.
Compared with un-vector-tile-toolkit/coesite, this repository has following characters:
- npm modules are updated.
- ESRI interface has been added. (see unvt/marble to check how it works)
- mysql is used for the session store.
- Some functions, such as raster drawing test and story-telling, are removed to make the structure simple.
I developed this nodejs server for Red Hat Enterprise Linux release 8.4.
Nodejs v16.13.1
npm 8.1.2
pm2 v4.5.0
git clone https://github.com/unvt/coesite3
cd coesite3
npm install
Edit .env and config/default.hjson to provide necessary confit setting, and prepare mysql to store the session info.
OAUTH_CLIENT_ID=Your APP/Client ID
OAUTH_CLIENT_SECRET=Your secret
OAUTH_REDIRECT_URI=https://yourdomain/unvt/auth/callback
OAUTH_SCOPES='user.read'
OAUTH_AUTHORITY=https://login.microsoftonline.com/(your place)/
{
morganFormat: tiny
htdocsPath: public
privkeyPath: key-location/privkey.pem
fullchainPath: key-location/cert.pem
logDirPath: log
port: 443
tz:{
unosm: 6
}
sTileName:{
unosm: small-scale
}
defaultZ: 6
mbtilesDir: mbtiles
esriDir: esri
esri-tilemap-min:{
ne-test: 0
}
esri-tilemap-max:{
ne-test: 5
}
}
node app.js
or
./pmserve.sh
To stop, run ./pmstop.sh
(Please make sure that you have the permission to execute sh scripts.)
sh containts sudo because I needed it in my own environment.
top page will be https://(your domain)/unvt
Tile will be served from https://(your domain)/unvt/VT/zxy/{t}/{z}/{x}/{y}.pbf
If your node is not allow to use port 443, try
which node
sudo setcap cap_net_bind_service=+ep (your location)/bin/node
Some plugins are stored in the public folder. maplibre-gl-export and maplibr-gl-legend are from watergis. (MIT license)