Configure hillshading layer
- full attribution - i18n key - paint property defaults as template
This commit is contained in:
parent
8c8582ac19
commit
ad68d0023b
6 changed files with 20 additions and 11 deletions
|
|
@ -244,9 +244,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
return new leafletOsmNotes();
|
||||
},
|
||||
|
||||
createMvtLayer: function (props) {
|
||||
const options = {};
|
||||
|
||||
createMvtLayer: function (props, options) {
|
||||
if (props.url in BR.layerIndex) {
|
||||
// url is key to style in local layers bundle (file name without '.json'),
|
||||
// suggested file naming convention: `<layer id>-style.json`
|
||||
|
|
@ -346,7 +344,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
} else if (props.dataSource === 'OpenStreetMapNotesAPI') {
|
||||
layer = this.createOpenStreetMapNotesLayer();
|
||||
} else if (props.type === 'mvt') {
|
||||
layer = this.createMvtLayer(props);
|
||||
layer = this.createMvtLayer(props, options);
|
||||
} else {
|
||||
// JOSM
|
||||
var josmUrl = url;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@ BR.MaplibreGlLazyLoader = L.Layer.extend({
|
|||
|
||||
_addGlLayer: function () {
|
||||
this.glLayer = L.maplibreGL(this.options);
|
||||
// see LayersConfig.createLayer
|
||||
this.glLayer.getAttribution = function () {
|
||||
return this.options.mapLink;
|
||||
};
|
||||
this._map.addLayer(this.glLayer);
|
||||
|
||||
this._updateZIndex();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue