Some helpful utils :)
From the repo root, in your terminal:
pip install -r convert/requirements.txt
External requirements:
After install python dependencies and making sure you have Tippecanoe and Gdal (ogr2ogr) available in your CLI environment, you can run python convert
from the repo root in your terminal:
Alternatively, you can pass the arguments as flags directly in one line. Run python convert --help
for more info.
Change config in tiles_config.yaml
or create a new version and pass that in to the CLI.
From the repo root, in your terminal:
cd viewer && npm install
# or yarn install
External requirements:
From the repo root, in your terminal:
cd viewer && npm run dev
# or yarn dev
- Copy your PMTiles file to
viewer/public
- Change the path in
viewer/src/config.ts
- In Config, you can set the following options:
- filePath: the path to your file from the
public
folder (eg. "/output.pmtiles") - minZoom: the lowest available zoom level (most zoomed out)
- maxzoom: the max available zoom level (most zoomed in) - if this is greater than your tileset's avaiable data, the map will keep looking for data, and may result in a blank map
- colorScale: named color scheme from d3's color scales like "turbo" or "blues" or "RdBu"
- colorDomain: a min and max value for the range of colors (eg. [0, 5000])
- property: data property to access to color (eg. "population")
- filePath: the path to your file from the
- You can change any config values except
filePath
and the changes will be reflected in your browser immediately.filePath
changes will automatically reload your window.
- In Config, you can set the following options: