开放街景Leaflet的不同风味地图

Different flavors of maps from open street view Leaflet

我有一张传单地图,我会用这个:

$('#map').height($(window).height()-64+'px');
            var map = L.map('map' , { zoomControl:false }).setView([51.505, -0.09], 13);
            new L.Control.Zoom({ position: 'bottomright' }).addTo(map);

            L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
                attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
            }).addTo(map);

这给出了一张有点无聊的灰度地图。我正在尝试为开放式街景制作一个更丰富多彩的,如下图 link 你点击图层并点击 "streets"

http://leafletjs.com/examples/layers-control-example.html

如果您想要彩色 OSM 贴图,请使用此

更改您的 L.tileLayer 函数
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    maxZoom: 19,
    attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});

Here 是传单的各种底图提供者的完整列表。

同时勾选 this link