From d956ceea01c9bceddd7bcce17a98ccefd38e4b66 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Tue, 29 Dec 2020 17:18:43 -0500 Subject: [PATCH] update AllLayers.js to new MapBox API (will need patch release) (#493) * update AllLayers.js to new MapBox API re #491 * fixes mapbox baselayers in example too * bump v2.4.1 with new mapbox API --- dist/LeafletEnvironmentalLayers.js | 27 +++++++-------------------- example/layers.js | 11 +++++------ package.json | 2 +- src/AllLayers.js | 10 ++++++---- 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/dist/LeafletEnvironmentalLayers.js b/dist/LeafletEnvironmentalLayers.js index 31a1fee78..6e66f63dd 100644 --- a/dist/LeafletEnvironmentalLayers.js +++ b/dist/LeafletEnvironmentalLayers.js @@ -25914,11 +25914,13 @@ L.LayerGroup.environmentalLayers = L.LayerGroup.extend( this._map = map; this.overlayMaps = {}; this.groupedOverlayMaps = {}; // For grouping layers in the new menu - var defaultBaseLayer = L.tileLayer('https://a.tiles.mapbox.com/v3/jywarren.map-lmrwb2em/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors', + var defaultBaseLayer = L.tileLayer('https://api.mapbox.com/styles/v1/jywarren/ckj06ujnc1nmi19nuelh46pr9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoianl3YXJyZW4iLCJhIjoiVzVZcGg3NCJ9.BJ6ArUPuTs1JT9Ssu3K8ig', { + tileSize: 512, + zoomOffset: -1, + attribution: '© Mapbox © OpenStreetMap' }); - var baseMaps = this.options.baseLayers ? this.options.baseLayers : { "Grey-scale": defaultBaseLayer.addTo(map) }; - + var baseMaps = this.options.baseLayers ? this.options.baseLayers : { "Grey-scale": defaultBaseLayer.addTo(map) }; + for (let layer of this.options.layers.include) { if (this.options.layers0.includes(layer)) { this.overlayMaps[layer] = window['L']['layerGroup'][layer](); @@ -26125,7 +26127,6 @@ L.LayerGroup.PLpeopleLayer = L.LayerGroup.extend( function popupDisplay(obj) { var popup_content = ""; - // if (image_url) popup_content += ""; // not available in the api yet popup_content += "