Skip to content

Commit

Permalink
Add sample configuration and a README file
Browse files Browse the repository at this point in the history
This is a pretty complex sample as it is based on the openstreetmap-carto
CartoCSS style [1] and is thus showing that it is indeed possible to setup
Tegola with an osm2pgsql-based database (see also go-spatial/tegola#144 for
a discussion about this) and might thus serve as the example mentioned in
go-spatial/tegola-osm#51.

[1] https://github.com/gravitystorm/openstreetmap-carto
  • Loading branch information
mstock committed Jun 3, 2019
1 parent 3134534 commit b35dac5
Show file tree
Hide file tree
Showing 2 changed files with 2,550 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tegola OpenStreetMap Carto

This repository contains a sample configuration for [Tegola](https://tegola.io/) that was built from the [openstreetmap-carto](https://github.com/gravitystorm/openstreetmap-carto) CartoCSS project using the script in [App-CartoCSS2Tegola](https://github.com/mstock/App-CartoCSS2Tegola/).

## Usage

In order to use this sample, you'll need a render database setup according to the [INSTALL.md](https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md) documentation. Please make sure that your database is created using UTF8 encoding (`createdb -E UTF8 -T template0 gis`) and that the database user configured in the `[[providers]]` section of `openstreetmap-carto.toml` can access the render database (or change these settings accordingly). Tegola can then be started as usual and should listen on port 8080:

tegola serve --config openstreetmap-carto.toml

## Tangram-based rendering

This repository also contains a very basic Tangram style below `tangram` which can be used to render some data in the web browser. This is best done by serving the `tangram` directory with some local web server and then opening the contained `index.html` file in a browser. If your render database contains data from Liechtenstein, you should see some buildings, colorful streets, green trees and some POIs. If you don't have data from Liechtenstein, you can change the parameters to the `map.setView()` call in `index.html`.
Loading

0 comments on commit b35dac5

Please sign in to comment.