Skip to content

Commit f826e2e

Browse files
committed
add attribution to "application/vnd.simplestyle-extended" layer type
1 parent 05b87ef commit f826e2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vue/src/views/Snapshot.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ export default {
310310
this.$store.commit('setBfsname', result.data.municipality.fullname);
311311
},
312312
313-
createFeatureLayer(geojson) {
313+
createFeatureLayer(geojson, attribution) {
314314
const geoJsonExtended = L.geoJson(geojson, {
315+
attribution,
315316
pointToLayer: (feature, latlng) => {
316317
if (feature.properties.radius) {
317318
// properties need to match https://leafletjs.com/reference-1.6.0.html#circle
@@ -361,7 +362,9 @@ export default {
361362
attribution: this.geojson.views[0].spec.attribution
362363
}));
363364
} else if (layer.mediatype === 'application/vnd.simplestyle-extended') {
364-
this.map.addLayer(this.createFeatureLayer(layer.data.features));
365+
this.map.addLayer(this.createFeatureLayer(
366+
layer.data.features, this.geojson.views[0].spec.attribution
367+
));
365368
}
366369
});
367370
} else if (this.bfsNumber) { // empty municipality

0 commit comments

Comments
 (0)