From 07063f474af07f4e3b90b58dab4eec81b2fbee73 Mon Sep 17 00:00:00 2001 From: Ian Dees Date: Wed, 19 Jun 2024 09:00:53 -0500 Subject: [PATCH] Add Mapbox and OSM attribution --- api/web/src/components/job/JobMap.vue | 4 ++++ api/web/src/components/util/Coverage.vue | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/web/src/components/job/JobMap.vue b/api/web/src/components/job/JobMap.vue index 3217694f..991de16d 100644 --- a/api/web/src/components/job/JobMap.vue +++ b/api/web/src/components/job/JobMap.vue @@ -36,6 +36,7 @@ export default { container: this.$refs.map, hash: "map", zoom: 1, + attributionControl: false, bounds: [ bounds[0][0][0], bounds[0][0][1], @@ -71,6 +72,9 @@ export default { }); tmpmap.addControl(new mapgl.NavigationControl(), 'bottom-right'); + tmpmap.addControl(new mapgl.AttributionControl({ + customAttribution: '© Mapbox | © OpenStreetMap Contributors' + })); tmpmap.once('load', () => { map = tmpmap; diff --git a/api/web/src/components/util/Coverage.vue b/api/web/src/components/util/Coverage.vue index 58d0a52f..d6312163 100644 --- a/api/web/src/components/util/Coverage.vue +++ b/api/web/src/components/util/Coverage.vue @@ -112,6 +112,7 @@ export default { const opts = { container: this.$refs.map, hash: "map", + attributionControl: false, style: { version: 8, sources: { @@ -153,6 +154,9 @@ export default { const tmpmap = new mapgl.Map(opts); tmpmap.addControl(new mapgl.NavigationControl(), 'bottom-right'); + tmpmap.addControl(new mapgl.AttributionControl({ + customAttribution: '© Mapbox | © OpenStreetMap Contributors' + })); tmpmap.once('idle', () => { map = tmpmap; if (this.bbox) map.fitBounds(this.bbox);