Skip to content

Commit

Permalink
Merge pull request #392 from openaddresses/map-attribution
Browse files Browse the repository at this point in the history
Add Mapbox and OSM attribution
  • Loading branch information
ingalls authored Jun 20, 2024
2 parents 14322c1 + 07063f4 commit b660c97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/web/src/components/job/JobMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -71,6 +72,9 @@ export default {
});
tmpmap.addControl(new mapgl.NavigationControl(), 'bottom-right');
tmpmap.addControl(new mapgl.AttributionControl({
customAttribution: '© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap</a> Contributors'
}));
tmpmap.once('load', () => {
map = tmpmap;
Expand Down
4 changes: 4 additions & 0 deletions api/web/src/components/util/Coverage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default {
const opts = {
container: this.$refs.map,
hash: "map",
attributionControl: false,
style: {
version: 8,
sources: {
Expand Down Expand Up @@ -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: '© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> | © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap</a> Contributors'
}));
tmpmap.once('idle', () => {
map = tmpmap;
if (this.bbox) map.fitBounds(this.bbox);
Expand Down

0 comments on commit b660c97

Please sign in to comment.