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

Accept DivIcon type in LMarker component prop #349

Open
gluebi opened this issue Sep 6, 2023 · 2 comments · May be fixed by #350
Open

Accept DivIcon type in LMarker component prop #349

gluebi opened this issue Sep 6, 2023 · 2 comments · May be fixed by #350

Comments

@gluebi
Copy link

gluebi commented Sep 6, 2023

Currently the icon prop only accepts the type Icon but the type DivIcon works just fine.

Therefore it makes sense to accept both.

I will create a pull request for that.

@gluebi gluebi changed the title Accept DivIcon type in LMarker component Accept DivIcon type in LMarker component prop Sep 6, 2023
gluebi added a commit to gluebi/vue-leaflet that referenced this issue Sep 6, 2023
@gluebi gluebi linked a pull request Sep 6, 2023 that will close this issue
@marisks
Copy link

marisks commented Jan 30, 2024

I have the same issue. I have an old Vue 2 code that I am migrating to Vue 3 and this is a stopper for moving further.
The fix seems simple and should work. When someone can review it and make a patch?

@gluebi
Copy link
Author

gluebi commented Jan 30, 2024

This shouldn't block you since you can always just cast Icon to DivIcon.

I am returning the icon from a function my code looks like this

const getIcon = (): Icon => {
  return L.divIcon({
    IconParams...
  }) as Icon
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants