[Marble-devel] Problem with MarbleWidget

Tommaso Fabbri atfabbri at gmail.com
Thu Jan 10 19:33:40 UTC 2013


Hi Dennis,
thank you for your reply.
I've solved the problem by removing and adding the GeoDataDocument in the
slot function:

map->model()->treeModel()->removeDocument(doc);
lon += 0.001;
lat += 0.005;
cout << "[MAPSLOT] Add Point" << endl;
line->append(GeoDataCoordinates(lon,lat,0,GeoDataCoordinates::Degree));
map->model()->treeModel()->addDocument(doc);

Thank you so much!


2013/1/10 Dennis Nienhüser <earthwings at gentoo.org>

> Hi Tommaso,
>
> the second paste (641072) seems expired, can you repaste it?
> On quick sight of the other files I see one problem: The track is updated,
> but the tree model is not notified about the change. Can you add a
> map->model()->treeModel()->**updateFeature(t);
> right before map->update(); in mapslot::update()?
>
> Regards,
> Dennis
>
> Am 08.01.2013 23:08, schrieb Tommaso Fabbri:
>
>  Hi to all,
>> I want to use the Marble API for viewing the current position of a
>> variable number of vehicles on a map.
>> Now my application uses the QtMobility API for visualizing the position
>> of the vehicles and the track generated.
>> I want to realize the behavior in this video https://dl.dropbox.com/u/**
>> 3894235/movie.mov <https://dl.dropbox.com/u/3894235/movie.mov>
>>
>> For testing the api, I've write a small program, that updates at running
>> time a GeoDataTrack object.
>>
>> A worker thread emit a signal every two seconds, and a mapslot object
>> that defines the slot updates the geodatatrack with a new point.
>>
>> At this links there're the worker thread class:
>> http://paste.kde.org/641060/
>> http://paste.kde.org/641072/
>>
>> At this link there're the mapslot object:
>> http://paste.kde.org/641078/
>> http://paste.kde.org/641084/
>>
>> At this link the main:
>> http://paste.kde.org/641090/
>>
>> I can view the track only with particular zoom, and not other. If I drag
>> the map, the object will disappear.
>> I need help.
>> Thank you so much!!
>>
>>
>>
>> --
>> Tommaso Fabbri
>>
>>
> ______________________________**_________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/**listinfo/marble-devel<https://mail.kde.org/mailman/listinfo/marble-devel>
>



-- 
Tommaso Fabbri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20130110/252a90cc/attachment-0001.html>


More information about the Marble-devel mailing list