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 OpenLayers.
- Clone and initialize this repo:
git clone [email protected]: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
tilemaker serve --port=9191
(if you set a different port in the.env.development
file, then match it accordingly)
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