Change map

This commit is contained in:
Aaron Lidman 2014-09-17 18:05:29 -07:00
parent 4ab348a63e
commit 8fbcb7fa92
7 changed files with 12 additions and 12 deletions

View File

@ -215,7 +215,7 @@ Vladimir Agafonkin, Leaflet maintainer.
<script>
var map = L.map('map').setView([51.503, -0.09], 13);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'}).addTo(map);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'}).addTo(map);
var polygon = L.polygon([
[51.509, -0.08],

View File

@ -91,7 +91,7 @@ Dave Leaver.
<script src="http://leaflet.github.io/Leaflet.markercluster/example/realworld.388.js"></script>
<script>
var mapbox = new L.TileLayer(MB_URL, {maxZoom: 18, attribution: MB_ATTR, id: 'examples.map-i86knfo3'}),
var mapbox = new L.TileLayer(MB_URL, {maxZoom: 18, attribution: MB_ATTR, id: 'examples.map-i875mjb7'}),
latlng = new L.LatLng(-37.820, 175.217);
var map = new L.Map('map', {center: latlng, zoom: 15, layers: [mapbox]});

View File

@ -27,7 +27,7 @@
mbUrl = 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png';
var grayscale = L.tileLayer(mbUrl, {id: 'examples.map-20v6611k', attribution: mbAttr}),
streets = L.tileLayer(mbUrl, {id: 'examples.map-i86knfo3', attribution: mbAttr});
streets = L.tileLayer(mbUrl, {id: 'examples.map-i875mjb7', attribution: mbAttr});
var map = L.map('map', {
center: [39.73, -104.99],

View File

@ -33,8 +33,8 @@ Leaflet has a nice little control that allows your users control what layers the
There are two types of layers --- base layers that are mutually exclusive (only one can be visible on your map), e.g. tile layers, and overlays --- all the other stuff you put over the base layers. In this example, we want to have two base layers (grayscale and night-style base map) to switch between, and an overlay to switch on and off --- city markers (those we created earlier). Lets create those layers and add the default ones to the map:
<pre><code>var grayscale = L.tileLayer(mapboxUrl, {id: 'examples.map-20v6611k', attribution: mapboxAttribution}),
streets = L.tileLayer(mapboxUrl, {id: 'examples.map-i86knfo3', attribution: mapboxAttribution});
<pre><code>var grayscale = L.tileLayer(mapboxUrl, {id: '<a href="https://mapbox.com">MapID</a>', attribution: mapboxAttribution}),
streets = L.tileLayer(mapboxUrl, {id: '<a href="https://mapbox.com">MapID</a>', attribution: mapboxAttribution});
var map = L.map('map', {
center: [39.73, -104.99],
@ -72,7 +72,7 @@ Now lets [view the result on a separate page &rarr;](layers-control-example.html
L.marker([39.77, -105.23]).bindPopup('This is Golden, CO.').addTo(cities);
var grayscale = L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-20v6611k'}),
streets = L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'});
streets = L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'});
var map = L.map('map', {
center: [39.73, -104.99],

View File

@ -30,7 +30,7 @@
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>',
id: 'examples.map-i86knfo3'
id: 'examples.map-i875mjb7'
}).addTo(map);
function onLocationFound(e) {

View File

@ -21,7 +21,7 @@
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>',
id: 'examples.map-i86knfo3'
id: 'examples.map-i875mjb7'
}).addTo(map);

View File

@ -141,7 +141,7 @@ Now you've learned Leaflet basics and can start building map apps straight away!
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'}).addTo(map);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'}).addTo(map);
L.marker([51.5, -0.09]).addTo(map)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
@ -173,12 +173,12 @@ Now you've learned Leaflet basics and can start building map apps straight away!
var map1 = L.map('map1').setView([51.505, -0.09], 13);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'}).addTo(map1);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'}).addTo(map1);
var map2 = L.map('map2').setView([51.505, -0.09], 13);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'}).addTo(map2);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'}).addTo(map2);
L.marker([51.5, -0.09]).addTo(map2);
@ -197,7 +197,7 @@ Now you've learned Leaflet basics and can start building map apps straight away!
var map3 = L.map('map3').setView([51.505, -0.09], 13);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i86knfo3'}).addTo(map3);
L.tileLayer(MB_URL, {attribution: MB_ATTR, id: 'examples.map-i875mjb7'}).addTo(map3);
L.marker([51.5, -0.09]).addTo(map3)
.bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();