You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
map.style.sourceCaches[`${this.asset.uuid}-data`]._source.attribution = 'text to be update';
Solution 3:
source.attribution = 'text to be update';
source.fire({type: 'data', data: {dataType: 'style'}});
Tried this above solution all works only for zoom in event not for zoom out. This is not correct way to do. It should be function like updateAttribution under source object.
Concepts
Implementation
The text was updated successfully, but these errors were encountered:
Motivation
Reference : https://gis.stackexchange.com/questions/407876/how-to-update-source-property-attribution-in-mapbox-gl
I faced issue while updating attribution based on zoom level. Didn't find right way to do it.
I tried directly using
Code which am trying to add source to layer.
Solution 1 :
Solution 2:
Solution 3:
Tried this above solution all works only for zoom in event not for zoom out. This is not correct way to do. It should be function like
updateAttribution
undersource
object.Concepts
Implementation
The text was updated successfully, but these errors were encountered: