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

Is it possible to do animation by using driver lat and long which am getting from server #12

Open
Suganyasrii opened this issue Dec 4, 2018 · 3 comments

Comments

@Suganyasrii
Copy link

In my application based on driver lat and long I need to animate marker as well show the polyline from driver to customer ,

@amanjeetsingh150
Copy link
Owner

Hey @Suganyasrii the driver mode is exactly the thing you want. Read the Readme.md. I have used a MQTT sever to receive location from server and then I apply animation on client side as soon I receive 2 LatLng points.

Do check it. If it is not clear I have also thought to update my Readme with a flow chart which can be useful while understanding.

Thanks.

@Suganyasrii
Copy link
Author

Suganyasrii commented Dec 6, 2018 via email

@amanjeetsingh150
Copy link
Owner

Hi @Suganyasrii ,
Yes it is possible to have that. I am explaining this in points will soon update my readme with a flowchart.

  1. There will a protocol by which you will be receiving your location updates. I have done it through MQTT. There can be many other ways to receive the location updates.
  2. Now, as soon as you start getting the location updates you will be needing two LatLng to dispatch your animation. For this I created a stream out of what I was getting from location updates and set a buffer of 2.
  3. Now as soon two LatLng are emitted my publish relay will dispatch an animation in it's subscription.

I have attached the code in readme for it.
Do tell me if any of these points need further explanation.

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