gis-ops / valhalla-app

This is the demo web app running on https://valhalla.openstreetmap.de
https://valhalla.openstreetmap.de
MIT License
163 stars 90 forks source link

Button created to locate ourselves: issue resolved #131 #156

Closed harsh5902 closed 1 year ago

harsh5902 commented 1 year ago

🛠️ Fixes Issue

issue #131 resolved

👨‍💻 Changes proposed

Created a button to move map to our location

📷 Screenshots

image

harsh5902 commented 1 year ago

Can't really judge it that well currently, as there's no comments explaining the code changes. It's good practice to give reviewers some context so reviewing doesn't require opening IDE and/or researching some API..

Other than that, I'd be fine with the concept I think, though not super happy with the button and its position. Is it possible to make it a leaflet control/button and integrate it into the right "sidebar" of buttons? e.g. above/below the zoom buttons. Tbh, I'm not too familiar with leaflet, but I'd imagine it's not hard?

Ok I will make the necessary changes So what happens now, is that when someone clicks on that button, the browser will ask for location permission right? What exactly happens if permission is denied?

Yes, it will ask for user consent first whether he/she is okay with sharing the location or not and then move to the map to the user's location.

nilsnolde commented 1 year ago

And

What exactly happens if permission is denied?

Simply nothing happens then right?

harsh5902 commented 1 year ago

And

What exactly happens if permission is denied?

Simply nothing happens then right?

Yeah!! nothing will happen.