Skip to content

Easier way to handle errors from ol-geolocation #209

@manusaurio

Description

@manusaurio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions