Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ol-options injection fails when plugin is not registered #402

Open
Fuzzyma opened this issue Jan 13, 2025 · 0 comments
Open

ol-options injection fails when plugin is not registered #402

Fuzzyma opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Fuzzyma
Copy link

Fuzzyma commented Jan 13, 2025

Describe the bug
The docs state, that you can either register the plugin globally using app.use(OpenLayersMap /*, options */); or import the components as needed via import { Map, Layers, Sources } from "vue3-openlayers";.

However, when doing the later, the console is full with warnings that ol-options cant be injected.

https://stackblitz.com/edit/vue3-openlayers-template-n8rcokez?file=src%2Fmain.ts

Affected version(s)

Please run npm list --depth=0 vue vue3-openlayers ol ol-ext ol-contextmenu and paste the output below:

To Reproduce
Steps to reproduce the behavior:

  1. Go to the stack blitz example
  2. Let it load
  3. Open the Browser console
  4. See error

Expected behavior

No warning in the console

Desktop (please complete the following information):

  • OS: win 10
  • Browser FF

Additional context

It is not entirely clear from the docs, if the plugin must still be registered even if using the explicit imports. However, I wonder why one would use explicit imports at all if the components are always globally available. The whole point is not to have global components when using the explicit import so it should just work like that.

@Fuzzyma Fuzzyma added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant