This is the user interface for the SO Map Viewer. The client is built with React and bundled by vite. The underlying mapping components are built with leaflet.js and react-leaflet.
- Clone and initialize this repo:
git clone git@github.com:simonsobs/tileviewer.git
cd tileviewer
npm install
-
Set up a
.env.development
file. The contents ofenv.development.sample
should suffice if you plan to serve the map tiles using the SO Tilemaker -
Depending on your tile server setup:
3A. If using the SO Tilemaker:
- Clone the repo and follow its README instructions for creating a
SQLite
database. - Amend the
settings.py
file as follows:
# vite's dev server is configured to be on port 8080; amend as desired. origins: list[str] | None = ["http://localhost:8080"] add_cors: bool = True
- Run the tile server locally via
uvicorn tilemaker.server:app --port=9191 --reload
3B. If using your own tile server:
- Set the
VITE_SERVICE_URL
environment variable in.env.development
to point to your local server - Run your tile server locally
- Clone the repo and follow its README instructions for creating a
-
Run the client dev server via
npm run dev