Skip to content

Commit

Permalink
Set yeti layer attribution from server
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvdo committed Dec 9, 2021
1 parent a54a053 commit db96c50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/components/yeti/YetiMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,9 @@ $yeti-height: calc(
}
}
</style>

<style>
.ol-attribution {
max-width: 75%;
}
</style>
3 changes: 1 addition & 2 deletions src/components/yeti/map-layers/YetiLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import 'vue-slider-component/theme/default.css';
import ol from '@/js/libs/ol';
const ATTRIBUTION = 'RGE ALTI®';
const OPACITY = 0.75;
export default {
Expand Down Expand Up @@ -147,7 +146,6 @@ export default {
imageLoadFunction(image) {
image.getImage().src = 'data:image/png;base64,' + imageBase64;
},
attributions: ATTRIBUTION,
imageExtent,
})
);
Expand All @@ -164,6 +162,7 @@ export default {
this.mapLegend.items.forEach((item) => {
item.color = `rgb(${item.color[0]}, ${item.color[1]}, ${item.color[2]})`;
});
this.layer.getSource().setAttributions('<li>| ' + this.mapLegend.attributions + '</li>');
},
toLinearRing(extent) {
let minX = extent[0];
Expand Down

0 comments on commit db96c50

Please sign in to comment.