From 76bedcb7799378b43af97fe15f3caf44924dc646 Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Mon, 17 Feb 2020 13:40:50 -0500 Subject: [PATCH] Make the Mapbox Satellite layer visible by default. --- .../farm_map_mapbox/js/farmOS.map.behaviors.mapbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/farm/farm_map/farm_map_mapbox/js/farmOS.map.behaviors.mapbox.js b/modules/farm/farm_map/farm_map_mapbox/js/farmOS.map.behaviors.mapbox.js index 0bf6f7c6..387f3522 100644 --- a/modules/farm/farm_map/farm_map_mapbox/js/farmOS.map.behaviors.mapbox.js +++ b/modules/farm/farm_map/farm_map_mapbox/js/farmOS.map.behaviors.mapbox.js @@ -3,15 +3,15 @@ attach: function (instance) { var key = Drupal.settings.farm_map.behaviors.mapbox.api_key; this.addMapboxLayer(instance, 'Mapbox Outdoors', 'mapbox.outdoors', key); - this.addMapboxLayer(instance, 'Mapbox Satellite', 'mapbox.satellite', key); + this.addMapboxLayer(instance, 'Mapbox Satellite', 'mapbox.satellite', key, true); }, - addMapboxLayer: function (instance, title, tileset, key) { + addMapboxLayer: function (instance, title, tileset, key, visible = false) { var opts = { title: title, url: 'https://api.mapbox.com/v4/' + tileset + '/{z}/{x}/{y}.png?access_token=' + key, group: 'Base layers', base: true, - visible: false, + visible: visible, }; instance.addLayer('xyz', opts); }