A PoC project that renders an imaginary map using a Mapbox GL JS API.
This is a sister project of COVID-19 research.
You need the following software installed,
- Node.js (tested with 12.14.0)
Please take the following steps,
-
Install modules.
npm ci -
Build the application.
npm run build -
You will find the following files in the
docsdirectory updated.index.htmlmain.js
For production, specify a --mode=production option at the step 2.
npm run build -- --mode=production
There is a Go program that converts a GeoJSON object into a Mapbox vector tile object.
Please refer to tools/geo2html for more information.
Map vector tiles are delivered through a CDN powered by AWS CloudFront.
Please refer to cdn for more information.
The following command starts a test service at http://localhost:3000.
npm start
You have to specify a CDN URL to a tile-api query parameter.
Suppose you have a CDN running at https://xyz.cloudfront.net, open the following URL.
http://localhost:3000/?tile-api=https%3A%2F%2Fxyz.cloudfront.net