ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
682 stars 230 forks source link

Attribution is always collapsed by default #514

Closed iboates closed 1 year ago

iboates commented 1 year ago

I have an attribution text but it is always collapsed by default. In vanilla OL you would have to create an Attribution object and set its collapsible paramater to false. Can you do this in VueLayers?

image

ghettovoice commented 1 year ago

Hello @iboates , vl-map has a prop default-controls though which you can configure initial set of map controls. The value can be an object or a collection of controls (by default it is true - use default set of controls), you can find description of this object here https://openlayers.org/en/v6.15.1/apidoc/module-ol_control.html#.defaults.

So, for your case, to only reconfigure Attributions control you can set something like this:

<VlMap :default-controls="{attributionOptions: {collapsed: false, collapsible: true}}">...</VlMap>