Registered Member
|
I am trying to create a live trace by plotting incoming lat/long GPS datapoints in marble. I have managed to achieve the functionality I am looking for, but the program randomly crashes with an access violation. After looking around it seems to me like some kind of conflict in the redrawing of the map or ui. I included my current implementation below and was hoping someone might have a better implementation method that avoids this issue. I was unable to add geodataplacemarks to the geodatadocument without removing it from the active widget, then readding it, so I am assuming there is a better way to do this.
My next thought is to create a set number of geodataplacemarks in my geodatadocument with coordinates initially set outside the viewing area, then using updateFeature() from the treemodel to properly update each placemark as new points come in. This still feels convoluted though and I am hoping there is a simpler way of doing this that I just don't know about. |
Registered Member
|
Am I wasting my time posting on this board? It seems like there aren't any replies to any of the recent topics. Is there a better place to ask questions like these?
|
Registered Member
|
Since it seems there aren't many contributors to this forum, I did find a solution to my problem.
It turns out there is a higher level functionality built into marble to create these gps point traces, and it's called GeoDataLineString. It stores a set of GeoDataCoordinates and is applied as geometry to a GeoDataPlacemark object. Its usage is as follows:
Making the route update is as easy as creating a new data point, appending it to the linestring, then updating the feature in the treemodel.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]