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

Easier way to handle errors from ol-geolocation #209

Closed
manusaurio opened this issue Jul 5, 2023 · 2 comments
Closed

Easier way to handle errors from ol-geolocation #209

manusaurio opened this issue Jul 5, 2023 · 2 comments

Comments

@manusaurio
Copy link

Is your feature request related to a problem? Please describe.
It's just a minor inconvenience. The library is great and allows doing many things effortlessly, so I think it'd be great if there was a way to handle geolocation errors in some way directly offered by the vue3-openlayers API. I don't think doing something like warning the user geolocation is needed is that odd (or just to make sure they know... maybe they didn't grant the permission and blocked it on the site without realizing.)

Describe the solution you'd like
An emit would be nice, although I'm not sure if this is an strange pattern for this case. Something like @onError= maybe?

Describe alternatives you've considered
Right now I'm just using a template ref in ol-geolocation and using myRef.value.geoLoc.on('error', ...) after mounting the component. It looks a bit brittle.

@d-koppenhagen
Copy link
Collaborator

I agree! I was refactor some other components the last days to be able to pass-through on events from openlayers. I have it on my list :)

@d-koppenhagen
Copy link
Collaborator

Done. Published with version v1.0.0-next.7.
Please have a look at the breaking changes.

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

No branches or pull requests

2 participants