最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Mapbox no longer work with Leaflet - Stack Overflow

programmeradmin2浏览0评论

I have been using Mapbox together with Leaflet for quite some time. Recently, the Mapbox maps stopped loading. What happened?

Here's the .js code thats used to load Mapbox's tiles:

var map = new L.map('map', {
    center: new L.LatLng(42.352455, -71.048069),
    zoom: 13,
    maxZoom: 17,
    layers: new L.TileLayer('.mapbox-streets/{z}/{x}/{y}.png')
});

I have been using Mapbox together with Leaflet for quite some time. Recently, the Mapbox maps stopped loading. What happened?

Here's the .js code thats used to load Mapbox's tiles:

var map = new L.map('map', {
    center: new L.LatLng(42.352455, -71.048069),
    zoom: 13,
    maxZoom: 17,
    layers: new L.TileLayer('http://a.tiles.mapbox./v3/mapbox.mapbox-streets/{z}/{x}/{y}.png')
});
Share asked Jan 4, 2013 at 23:28 NyxynyxNyxynyx 63.9k163 gold badges507 silver badges856 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

You should be using map tiles hosted in your own account. The mapbox.mapbox-streets is no longer valid.

发布评论

评论列表(0)

  1. 暂无评论