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

Render Pre-existing JSON Directions Data in Map #201

Open
blitzve0 opened this issue Jul 28, 2022 · 5 comments
Open

Render Pre-existing JSON Directions Data in Map #201

blitzve0 opened this issue Jul 28, 2022 · 5 comments

Comments

@blitzve0
Copy link

Hi I have already saved a directions api response on my server, now i only want to load the data and render it using polyline, is their a way to solve this?

@bramus
Copy link
Owner

bramus commented Jul 28, 2022

I am open to a PR that provides this.

@LazyAfternoons
Copy link

LazyAfternoons commented Aug 22, 2022

+1 on this feature. Storing the directions api response and sending it to this component with a prop would be nice.
Thank you.

@blitzve0
Copy link
Author

+1 on this feature. Storing the directions api response and sending it to this component with a prop would be nice.
Thank you.

Hi, I have actually found a solution for this since then, in the directions api response, just save the response.routes[0].overview_path
This will give you the latLng array and then we can simply render this latLng array using a basic polyline on a mapview

@LazyAfternoons
Copy link

+1 on this feature. Storing the directions api response and sending it to this component with a prop would be nice.
Thank you.

Hi, I have actually found a solution for this since then, in the directions api response, just save the response.routes[0].overview_path This will give you the latLng array and then we can simply render this latLng array using a basic polyline on a mapview

Thank you for your help. That implies not using this library at all, right?

@blitzve0
Copy link
Author

yes basically 😂😂

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

No branches or pull requests

3 participants