MelihAltintas / vue3-openlayers

Web map Vue 3.x components with the power of OpenLayers
https://vue3openlayers.netlify.app/
MIT License
629 stars 120 forks source link

Default Controls shows blank map #334

Closed SezerYardim closed 2 months ago

SezerYardim commented 2 months ago
          I cannot use :controls="defaultControls" in ol-map too. It shows blank map
<ol-map
    ref="mapRef"
    style="width:500px; height:500px"
    :controls="defaultControls()"
/>

import { defaults as defaultControls } from 'ol/control'

Originally posted by @ltt2801 in https://github.com/MelihAltintas/vue3-openlayers/issues/264#issuecomment-1782217718

d-koppenhagen commented 2 months ago

What version are you using?

SezerYardim commented 2 months ago

What version are you using?

vue3-openlayers@4.1.2

d-koppenhagen commented 2 months ago

Have you tried it with the latest version? Can you provide a minimal Stackblitz or example project for reproduction

d-koppenhagen commented 2 months ago

I just tested with version 8.0.0 and the controls are visible by default (as default of controls prop already set to defaultControls() in underlying OpenLayers by default. Not sure what exacltly is wrong. Please provide an example for reproduction using the latest major version.

SezerYardim commented 2 months ago

It works on v8.0.0. If this is the LTS version you may want to consider changing the npm install version. I needed to install it "latest" suffix

d-koppenhagen commented 2 months ago

Currently there is not LTS concept for this lib. You can consider the latest version as stable and fixes / new features will mostly only applied on the latest stable major version. Checking NPM shows me, the latest is pointing to version 8.0.0, so this should be okay. https://www.npmjs.com/package/vue3-openlayers?activeTab=versions

Just as information: you should not set "vue3-openlayers": "latest" in your package.json file as this may introduce unwanted braking changes which you should carefully check before (checking the changelog). "vue3-openlayers": "^8.0.0" will be better.