Answer the question
In order to leave comments, you need to log in
What is the best way to implement the following task in C#?
Good afternoon.
There is a certain cartographic product and API for writing your desktop application.
A map is created on which some objects are applied from an external data source (DB). Objects are stored in the map as in the database.
Information on the map should be updated every 1 second.
Question: How to update the data on the map when the data (coordinates of objects) in the external database changes? Objects can have both immutable and mutable data. For example, the car changed direction or speed.
I assumed that it was possible to form some initial State to update it from the database, and then update the map using events. But I'm not sure if this is the best solution.
I understand that the question is too abstract, but maybe someone has solved similar problems and will tell you their approach. Maybe some pattern to use?
Answer the question
In order to leave comments, you need to log in
Objects are stored in the map as in the database.
Objects can have both immutable and mutable data. For example, the car changed direction or speed.
Information on the map should be updated every 1 second.
Objects are not stored on the map, they are displayed on it.
From the point of view of geolocation, the object from the changeable data has only coordinates, and based on the previous coordinates and the current one, you can calculate the direction and speed of movement.
Are you sure that you need such a frequency of updates? How often will coordinates be updated in the database? What is the average speed of the objects? What is the accuracy of GPS sensors?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question