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

Dynamic polylines #7

Closed
ShivamMattoo33 opened this issue Jun 14, 2022 · 7 comments
Closed

Dynamic polylines #7

ShivamMattoo33 opened this issue Jun 14, 2022 · 7 comments
Assignees

Comments

@ShivamMattoo33
Copy link

Hello,
I want the polylines to be generated on the map dynamically based on drivers position and a fixed destination. So basically as driver moves closer to destination previous lines disappear as it has a new source location
I am getting stream of driver latitude and longitude from the api. How do I set a dynamic source location or what is the best possible way to handle this?
Thanks

@ShivamMattoo33
Copy link
Author

Hi Any updates on this ?

@rithik-dev
Copy link
Owner

Hey, I was thinking of providing a boolean named updatePolylinesOnDriverLocUpdate, that will call the polylines API whenever a new stream element to the driver stream is pushed, and update the polylines. (from the driver to the destination)

Let me know if that'll work for you..

@ShivamMattoo33

@ShivamMattoo33
Copy link
Author

ShivamMattoo33 commented Jun 15, 2022

That will work worth giving a try. Having these things sorted out which makes this widget compatible with real world use cases like updated polylines and rotation of cars on turns would make this package super popular and useful

@rithik-dev rithik-dev self-assigned this Jun 15, 2022
@rithik-dev
Copy link
Owner

Hi @ShivamMattoo33, the fix is live. Try using version 1.0.4 and it should work fine.

Thanks for reporting this issue.

@ShivamMattoo33
Copy link
Author

That worked like a charm Thanks

@rithik-dev
Copy link
Owner

That is great to hear!!

However, I was thinking to default the value to false, (right now it's true), as not everyone would want that in my opinion.

Just make sure to explicitly assign true to the variable updatePolylinesOnDriverLocUpdate, so even if I change the default value in the future, you code doesn't break.

Thanks

@ShivamMattoo33
Copy link
Author

Yes that works

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

No branches or pull requests

2 participants