Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update/refresh overlays in GMap?

Tags:

c#

gmap.net

I have this problem:

I have a list of points List<PointLatLng> and an overlay where a trajectory of the points is shown. I also use TabPages and inside one page there is the gMapcontrol. Unfortunately the trajectory is updated only when the page is not shown, I mean, when the focus is on another page.

Once I open the page with the Map the trajectory stops to update. How can I fix this?

I tried with:

BeginInvoke((Action)(() => gMapControl.Refresh()));

Inside the DataReceived event, but it only works as I said before.

like image 764
Okenite Avatar asked Jan 11 '18 08:01

Okenite


1 Answers

I resolved this problem with:

gMapControl1.Zoom = -5;
gMapControl1.Zoom = 5;
like image 72
Josshua Calixto Avatar answered Nov 17 '22 22:11

Josshua Calixto