Vaadin Maps: Showing live gps movement of a vehicle

Hi experts,

I have few services configured on Azure to send me live coordinates of a moving vehicle. I would like to know if there is a tutorial or guide that can help me show live moving vehicle using Vaadin maps.

This blog post: Introducing the Vaadin Map component | Vaadin
briefly mentions * Server push support (e.g., moving vehicles, changing conditions), but I don’t see any such information available in the official documentation here: https://vaadin.com/docs/latest/components/map

Do we already have interfaces to support such scenario or is it completely on me to develop or webhook etc. to receive the push events with live coordinates and figure out how to show that on the map.

Appreciate your help.

Thanks

Totally up to you. Vaadin provides you with building blocks - the map, an API to add points to it and
Push to asynchronous push those to the client.

1 Like

And for asynchronous jobs, read the docs: https://vaadin.com/docs/latest/building-apps/application-layer/background-jobs

https://vaadin.com/docs/latest/building-apps/application-layer/background-jobs/interaction

https://vaadin.com/docs/latest/building-apps/presentation-layer/server-push

2 Likes

@knoobie @ollit.1 Thanks for the information. Will take a look at the documentation links that you have provided.

Just create a map marker representing the car, then change marker latitude/longitude as the car moves. Make sure to do that from Vaadin UI thread (ui.access()) and enable Push, to make sure the updated marker data is sent to the browser.

1 Like