From 022b836fa9760545f5d37fec77147b8d24b63530 Mon Sep 17 00:00:00 2001 From: Edwin Shin Date: Thu, 14 May 2015 16:17:12 +0800 Subject: [PATCH] Update quick-start.md Updates Mapbox url to use: i) SSL, ii) v4 API, iii) custom keys for id and accessToken Adds documentation link for URL template --- examples/quick-start.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/quick-start.md b/examples/quick-start.md index 37c0916c..37c74650 100644 --- a/examples/quick-start.md +++ b/examples/quick-start.md @@ -49,11 +49,13 @@ By default (as we didn't pass any options when creating the map instance), all m Note that `setView` call also returns the map object --- most Leaflet methods act like this when they don't return an explicit value, which allows convenient jQuery-like method chaining. -Next we'll add a tile layer to add to our map, in this case it's a Mapbox Streets tile layer. Creating a tile layer usually involves setting the URL template for the tile images (get yours at [Mapbox](http://mapbox.com)), the attribution text and the maximum zoom level of the layer: +Next we'll add a tile layer to add to our map, in this case it's a Mapbox Streets tile layer. Creating a tile layer usually involves setting the [URL template](http://leafletjs.com/reference.html#url-template) for the tile images (get yours at [Mapbox](http://mapbox.com)), the attribution text and the maximum zoom level of the layer: -
L.tileLayer('http://{s}.tiles.mapbox.com/v3/MapID/{z}/{x}/{y}.png', {
+
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
 	attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
-	maxZoom: 18
+	maxZoom: 18,
+	id: '[your.mapbox.project.id](https://www.mapbox.com/projects/)',
+	accessToken: '[your.mapbox.public.access.token](https://www.mapbox.com/account/apps/)'
 }).addTo(map);
Make sure all the code is called after the `div` and `leaflet.js` inclusion. That's it! You have a working Leaflet map now.