Forum > Packages and Libraries

[Solved] lazmapviewer: custom draw issue (OnDrawGpsPoint + thread)

(1/1)

Frate:
Hello,

i just started a new project using lazmapviewer. I was able to set it up and everything is working properly.
But I have an issue when I try to custom draw gps points with threading option enabled in TMapView.
I basically have muptiple GPS point to draw with different shapes and colors. The issue is changing the points colors randomly at each redraw.

I have a video as example, you can also take a look at the modified attached example that reproduces the issue (at least on my pc).
https://youtu.be/AO0wB7KIBsQ

If I disable "use thread" option in the map component , it draws properly.

I would like to keep trheading enabled as it provides a significant performance boost to the application.

What am I doing wrong? Is this a known bug? Is there a fix to this?

Thanks

Elia

wp:
The list of gps items was not locked during repainting. Please check out the current svn version (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazmapviewer/).

Frate:
Now is working like a charm!

Thanks for your time

Regards

Elia

Navigation

[0] Message Index

Go to full version