kopia lustrzana https://github.com/osm2vectortiles/osm2vectortiles
Replace instructions with code instructions
rodzic
0a0eedc856
commit
167491fba3
|
@ -16,7 +16,14 @@ In order to render your map with Mapbox GL JS you need to set up a simple server
|
|||
|
||||
An mbtiles file is essentialy just a sqlite database with a specific schema. The script listens on port 3000 and answers request in the form of `/<mbtiles-name>/<z>/<x>/<y>.pbf` and returns the vector tile at the requested xyz-coordinate.
|
||||
|
||||
We have prepared a repository containing all the necessary files for you. Simply clone [this repository](https://github.com/osm2vectortiles/mbtiles-server-example){:target="_blank"}, run `npm install`, [download](http://osm2vectortiles.org/downloads){:target="_blank"} your desired extract and run `node index.js` and the vector tiles are getting served.
|
||||
We have prepared a repository containing all the necessary files for you. Simply run the follwoing commands and the vector tiles are getting served. Other extracts can be found under the [downloads section](http://osm2vectortiles.org/downloads){:target="_blank"}.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/osm2vectortiles/mbtiles-server-example
|
||||
npm install
|
||||
wget https://osm2vectortiles/downloads/zurich.mbtiles
|
||||
node index.js
|
||||
```
|
||||
|
||||
## Display a map in your browser
|
||||
|
||||
|
@ -28,7 +35,13 @@ The `bright-v9.json` file defines how each feature of the map should be styled a
|
|||
|
||||
<script src="https://gist.github.com/manuelroth/d67f1ae67dddbb659ff17a7bb854096d.js"></script>
|
||||
|
||||
To get you started quickly we have created a repository with the necessary files and assets. Clone [this repository](https://github.com/osm2vectortiles/mapbox-gl-js-example){:target="_blank"}, start your favorite webserver(`npm install http-server -g) and you should see the map in your browser.
|
||||
To get you started quickly we have created a repository with the necessary files and assets. Run the following commands and you should see the map in your browser.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/osm2vectortiles/mapbox-gl-js-example
|
||||
npm install http-server -g
|
||||
http-server
|
||||
```
|
||||
|
||||
## Use our Public CDN for serving vector tiles
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue