The OpenFLAME interactive map application is a static site generated using Vite build tool and uses React. The generated static site is hosted at map.open-flame.com using Github Pages.
cd tileset-creator
npm install
The map shows Google Photorealistic 3D Tiles by default. This needs an API key. For development, change API key in .env.development to your Map Tiles API key. Stop Github from tracking and accidentally committing your key using:
git update-index --assume-unchanged .env.development
The production key in .env.production is restricted to the map.open-flame.com hostname and cannot be used for development.
There are two build modes: Development and Production. They differ with respect to the browser console logs and the API key used. Development build logs more messages to the console and uses the development API key.
Development build:
npm run build:dev
Production build:
npm run build:prod
The static webpage files are written to the dist/ directory. Run any HTTP/HTTPS server to see the generated site. For example:
python3 -m http.server
HTTPS is required for interaction with map servers that only respond to requests from secure origins. You can run a HTTPS server using:
openssl req -new -x509 -keyout key.pem -out cert.pem -days 365 -nodes
http-server -S -C cert.pem -K key.pem
Deploy to Github Pages using npm run deploy.