java - Gaode map displays the obtained longitude and latitude in real time
ringa_lee
ringa_lee 2017-05-16 13:26:49
0
3
1075

I need to display a vehicle on the map in real time. The device will upload the longitude and latitude information continuously every few seconds, and then the server will return to the app.

My current idea is to refresh it regularly, then jump to it with the maker click, and then add a line in the middle to show real-time dynamics. But it seems inappropriate to keep sending requests.

Is there a more suitable way, or can we share the logic implementation? Must use Gaode map.

Thank you all!

ringa_lee
ringa_lee

ringa_lee

reply all(3)
Ty80

If it’s once every few seconds, using ajax will be too frequent. Personal suggestion:

  1. If it is a Web client, it is recommended to use websocket, which is very suitable for this requirement;

  2. If it is an App client, you can consider using tcp / udp connection;

  3. If you are just transmitting latitude and longitude, you can consider using a message queue service, such as: mqtt.

迷茫

Either the server has a long connection with your app, and the server push message triggers the app's UI update; or the app polls the server to get the data and renders the UI

某草草

I also have this need recently. If you have any good ideas, please share them

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template