ghettovoice / vuelayers

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

default-controls set to false still shows zoom controls #415

Closed kalyncoose closed 3 years ago

kalyncoose commented 3 years ago

Hello and thank you so much for this Vue library for OpenLayers @ghettovoice ! I am refactoring a Leaflet (Vue2-leaflet) project into VueLayers and have had an easy time so far.

My issue is with the default-controls or controls parameter for the vl-map component. I combed through the existing issues and documentation first before posting. It appears that the parameter, when set to false, does not remove the default zoom control that appears in the upper-left corner of the map. See my component:

<vl-map :load-tiles-while-animating="true" :load-tiles-while-interacting="true" :default-controls="false"
            data-projection="EPSG:3857" style="height:100vh;" @click="handleClick($event.coordinate)">

Screenshot (I have a custom search bar, but you can see the zoom control is the blue peaking out behind it):

screenshot

Here is the documentation page for the parameter. It used to be called default-controls but now is controls. I tried both parameters and no luck, the zoom controls keep appearing. I am using this version in my package.json: "vuelayers": "^0.11.31",

Should I try accessing the olMap instance and manually setting the controls to false? If so, could you please provide some example code of how to access the underlying map and its controls, thanks!

ghettovoice commented 3 years ago

@kalyncoose thanks for report! Should work as expected in v0.11.32

scil commented 2 years ago

in v0.12.3, attribute default-controls works well, but controls not.

ghettovoice commented 2 years ago

@scil default-controls in v0.12 it is renamed controls from v0.11