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

Add getPosition as a function #20

Open
eklem opened this issue Mar 12, 2023 · 1 comment
Open

Add getPosition as a function #20

eklem opened this issue Mar 12, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@eklem
Copy link
Owner

eklem commented Mar 12, 2023

Not much code, but would be good to not have to figure it out every time you use the library.

// Position promise
function getPosition() {
  return new Promise((res, rej) => {
    navigator.geolocation.getCurrentPosition(res, rej, getPositionOpt)
  })
}
@eklem eklem added the enhancement New feature or request label Mar 12, 2023
@eklem eklem self-assigned this Mar 12, 2023
@eklem
Copy link
Owner Author

eklem commented Mar 12, 2023

Check if it's a good idea or not after the demo is set up and working.

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

No branches or pull requests

1 participant