https://github.com/simonsobs/tileviewer
The frontend for the SO tilemaker and SO tileserver.
https://github.com/simonsobs/tileviewer
Last synced: 8 months ago
JSON representation
The frontend for the SO tilemaker and SO tileserver.
- Host: GitHub
- URL: https://github.com/simonsobs/tileviewer
- Owner: simonsobs
- Created: 2024-10-04T18:09:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T22:02:00.000Z (over 1 year ago)
- Last Synced: 2025-02-10T23:19:42.255Z (over 1 year ago)
- Language: TypeScript
- Size: 158 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tileviewer
This is the user interface for the SO Map Viewer. The client is built with [React](https://react.dev/) and bundled by [vite](https://vite.dev/). The underlying mapping components are built with [leaflet.js](https://leafletjs.com/) and [react-leaflet](https://react-leaflet.js.org/).
## Steps to run locally
1. Clone and initialize this repo:
```sh
git clone git@github.com:simonsobs/tileviewer.git
cd tileviewer
npm install
```
2. Set up a `.env.development` file. The contents of `env.development.sample` should suffice if you plan to serve the map tiles using [the SO Tilemaker](https://github.com/simonsobs/tilemaker)
3. Depending on your tile server setup:
3A. If using the SO Tilemaker:
- Clone the repo and [follow its README instructions](https://github.com/simonsobs/tilemaker#readme) for creating a `SQLite` database.
- Amend the `settings.py` file as follows:
```py
# 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
4. Run the client dev server via `npm run dev`