Skip to content

Commit 422e18f

Browse files
committed
readme
1 parent 20fc70a commit 422e18f

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Vector Tiles Frontend
2+
3+
`vector_tiles_frontend` is an application for displaying vector styles with custom styles.
4+
5+
- [Instructions for installation](https://github.com/SDFIdk/vector_tiles_frontend/blob/main/docs/tutorials/installing.md)
6+

config.example.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* THESE CONFIGURATIONS WILL BE MADE PUBLIC!
3+
*
4+
* These variables will be available in a Javascript for everyone to see.
5+
* NO SECRET PASSWORDS HERE, PLEASE
6+
*/
7+
8+
const config = {
9+
// API TOKEN can be aquired from https://dataforsyningen.dk/
10+
API_TOKEN: '[ INSERT TOKEN ]',
11+
API_VECTOR_TILES_BASEURL: 'https://api.dataforsyningen.dk/wmts/skaermkort_vector_tiles_labs/v1',
12+
}

docs/tutorials/installing.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Installing and building locally
2+
3+
To install and build `vector_tiles_frontend` locally, run these commands:
4+
5+
1. `git clone https://github.com/SDFIdk/vector_tiles_frontend`
6+
2. `cd vector_tiles_frontend`
7+
3. `npm install`
8+
9+
## Configuration (config.js)
10+
Vector tiles expects to find a `config.js` file in the root folder when hosted.
11+
12+
The contents of `config.js` should be a single Javascript object defined like so:
13+
```
14+
const config = {
15+
// API TOKEN can be aquired from https://dataforsyningen.dk/
16+
API_TOKEN: '[ INSERT TOKEN ]',
17+
API_VECTOR_TILES_BASEURL: 'https://api.dataforsyningen.dk/wmts/skaermkort_vector_tiles_labs/v1',
18+
}
19+
```
20+
You'll need to supply your own tokens for your particular configuration.
21+
You can copy and edit `config.js.example` to use as your own `config.js`.
22+
23+
## Build for development
24+
Run `npm run dev` to start a development server running locally at `localhost:8000`
25+
26+
## Build for production
27+
Run `npm run build` to make a production build. The built resources are saved in `dist/` folder; ready to be hosted along with the static assets in the `public` folder.

0 commit comments

Comments
 (0)