Ticket #3551 (new feature)

Opened 20 months ago

Last modified 19 months ago

Moving label features may not work

Reported by: xiaoyuewanli Owned by:
Priority: minor Milestone: 2.13 Release
Component: general Version: 2.11
Keywords: Cc:
State:

Description

After I add a vector layer for labels, when I drag map and update the label location in code. Label position will be wrong. Markers' are right. I have to zoom map to refresh vector layer to make label position right. See attachment

Attachments

test2.html Download (7.5 KB) - added by xiaoyuewanli 20 months ago.
20-10-2011 16-46-33.png Download (188.0 KB) - added by xiaoyuewanli 19 months ago.
Marker Vector Screenshot

Change History

Changed 20 months ago by xiaoyuewanli

follow-up: ↓ 3   Changed 19 months ago by erilem

  • summary changed from Is this a bug? to Moving label features may not work

Note that the Feature.Vector::move function isn't part of the API. Have you tried setting new coordinates in your label feature's geometry and call drawFeature(labelFeature)?

To me there's still no evidence that there's a bug in the library.

PS : "Is this a bug?" is a poor ticket summary.

  Changed 19 months ago by xiaoyuewanli

Yes I tried. It didn't work. Currently I have to destroy it and then re-add a new vector with the new lon and lat. So far so good with test data. But I reckon it will lag if more than 100 moving vehicles' GPS positons come in. :( So still I would like to optimzie it if you have better ideas. Markers layer works well. If I could add a text under the marker icon with Marker Layer not Vecto layer, that would be perfect.

in reply to: ↑ 1   Changed 19 months ago by xiaoyuewanli

Yes I tried. It didn't work. Currently I have to destroy it and then re-add a new vector with the new lon and lat. So far so good with test data. But I reckon it will lag if more than 100 moving vehicles' GPS positons come in. :( So still I would like to optimzie it if you have better ideas. Markers layer works well. If I could add a text under the marker icon with Marker Layer not Vecto layer, that would be perfect.

Replying to erilem:

Note that the Feature.Vector::move function isn't part of the API. Have you tried setting new coordinates in your label feature's geometry and call drawFeature(labelFeature)? To me there's still no evidence that there's a bug in the library. PS : "Is this a bug?" is a poor ticket summary.

Changed 19 months ago by xiaoyuewanli

Marker Vector Screenshot

Note: See TracTickets for help on using tickets.