GmapControl makes the Form very slow if multiple polygons added

Topics: Windows Forms
Aug 8, 2012 at 9:38 PM
Edited Aug 8, 2012 at 9:39 PM


I am developing a project in which areas of a city have to be bounded by a polygon.

I am creating polygons by taking the lat and longs from KML File.

But as soon as click the button to plot polygons my form becomes very slow nearly unresponsive.


I am creating some 198(actually exact) Polygons.


Need help on how to solve this problem ?

Any help will be appriciated :)



Aug 9, 2012 at 5:21 AM


I have the same problem, it seems to come when the Polygons layer is displayed

I've try with all polygons isvisible=false but the polygon layer isvisibe=true : no much difference

But If I switch off the polygon layer it seems better.
I will try to run som objective result about that

Aug 9, 2012 at 6:43 AM

make it faster, don't complain

Aug 9, 2012 at 8:09 AM

Hello Radioman

I do not complain, but just trying to figure out in which situation polygons display are affecting the performance and how we can improde that

Thanks for your GREAT work !

Aug 9, 2012 at 1:58 PM

thankx for the reply radioman.

As soon as I get free from this project i'am in, i'll try to make it faster. But i guess there is greater possibility of you doing it before ;)

Thanks a million for Great Maps :)

You Rock



Aug 23, 2012 at 6:50 PM

If you really need speed, and you need to draw polygons, you can convert the gps coordinates to graphic coordinates and draw your polygons in the paint() event of the gmap control...



Aug 23, 2012 at 10:41 PM

whats the difference? ;}

Aug 27, 2012 at 4:33 PM

you can guide me code drawing route going between points on the map (Code)

thank you very much

Aug 27, 2012 at 9:25 PM


Really dont know (you know i dont dive in C# yet :)) wath's the difference, but using paint event i can draw more than 300.000 lines in a second using your FromLatLngToLocal function to translate the gps coordinates to graphics coordinates. All the stuff takes 800 ms in a i3 with 2 gig of ram.

Wonderfull control... jeje


Aug 27, 2012 at 10:08 PM

try it on supercomputer ;}

Aug 27, 2012 at 10:11 PM

And what if i try learning C# coding (or even coding right in The problem is the indian, not then bow nor the arrow... jejeje!

Sep 20, 2012 at 5:08 AM

Hello radioman,

i've the same problem. In old version, i could draw a lot of polygons without performance lost, but actually i draw just 3 polygons and the control is responsible any more. Is it possible that the events Click, Over and so are the problem, 'cause this is new? Perhaps you can build 2 Types of Polygons(with/without events)?

Thanks for your help

bye EDE

Sep 20, 2012 at 6:23 AM

by default polygon IsHitTestVisible = false, it can draw thousands of marker, works quite fast