Append public cdn example to getting started tutorial, remove public cdn link from main doc page

pull/319/head
Manuel Roth 2016-05-11 18:38:49 +02:00
rodzic b17832bb69
commit 03521deedc
2 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -16,7 +16,7 @@ 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), run `npm install`, [download](osm2vectortiles.org/downloads) 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 clone [this repository](https://github.com/osm2vectortiles/mbtiles-server-example){:target="_blank"}, run `npm install`, [download](osm2vectortiles.org/downloads){:target="_blank"} your desired extract and run `node index.js` and the vector tiles are getting served.
## Display a map in your browser
@ -28,6 +28,16 @@ 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), 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. 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.
## Use our Public CDN for serving vector tiles
If you don't want to serve the vector tiles yourself, you can use our public CDN. Klokan Technologies provides a free and fast CDN serving vector tiles of the entire planet for development purposes and testing.
The free CDN service is not recommended for production use in mobile or web applications and commercial use is prohibited without permission. The service is made for demonstration of the open-source technology developed in this project and for designers, but should not be used on servers or in any final products.
### Using the Service
To use the public CDN instead of your local running server you need to replace the vector tile source in the style json with the url of the public CDN.
<script src="https://gist.github.com/manuelroth/427dbf552f69ebb997929148587deda4.js"></script>

Wyświetl plik

@ -10,7 +10,6 @@ Get started styling and using vector tiles.
- [Getting started](/docs/getting-started)
- [Create a Style with new Mapbox Studio](/docs/create-map-with-mapbox-studio)
- [Use public CDN](/docs/use-public-cdn)
- Vector Tiles
- [Create your own Vector Tiles](/docs/own-vector-tiles)
- [Create your own Extract](/docs/extracts)