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

Show POI near routing #681

Open
refda opened this issue Nov 11, 2022 · 2 comments
Open

Show POI near routing #681

refda opened this issue Nov 11, 2022 · 2 comments
Labels

Comments

@refda
Copy link

refda commented Nov 11, 2022

Hello,
I have a mysql database with a lot of points (lat/lon) and would like to display all points near the route. For example all supermarkets around the driving route.
How can I get line coordinates from this route and send them to the database? I only worked with fixed points and radius to query mysql data.
Would be glad to hear some tips.

@curtisy1
Copy link
Collaborator

curtisy1 commented Nov 19, 2022

How can I get line coordinates from this route and send them to the database?

If you have your routing machine set up correctly, you could access control._routes to get access to the routes returned from your routing provider. The _routes object has a coordinates property, which is an array of leaflet LatLngs.

@refda
Copy link
Author

refda commented Nov 19, 2022

How can I get line coordinates from this route and send them to the database?

If you have your routing machine set up correctly, you could access control._routes to get access to the routes returned from your routing provider. The _routes object has a coordinates property, which is an array of leaflet LatLngs.

Thanks for the suggestions. I will try to follow these properties. For now I am trying to to convert LatLngs to Points in the database to make proper requests.

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

No branches or pull requests

2 participants