Recent

Author Topic: [Solved] lazmapviewer: custom draw issue (OnDrawGpsPoint + thread)  (Read 1509 times)

Frate

  • New Member
  • *
  • Posts: 23
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
« Last Edit: May 05, 2021, 10:55:55 am by Frate »

wp

  • Hero Member
  • *****
  • Posts: 8368
Re: lazmapviewer: custom draw issue (OnDrawGpsPoint + thread)
« Reply #1 on: May 02, 2021, 02:26:07 pm »
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/).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Frate

  • New Member
  • *
  • Posts: 23
Re: lazmapviewer: custom draw issue (OnDrawGpsPoint + thread)
« Reply #2 on: May 03, 2021, 12:40:33 am »
Now is working like a charm!

Thanks for your time

Regards

Elia

 

TinyPortal © 2005-2018