Zoom displayed markers

Topics: Help
Dec 5, 2011 at 2:24 PM


could you help me with zooming markers?

When i use ZoomAndCenterMarkers() method in constructor of my class implementing gmapControl map won't zoom in. I just see the markers from very high level.

I call it as last thing in constructor after I added overlay with markers.

When I for ex. insert MassageBox.Show(blabla); before calling this method in constructor and( when running) I close messageBox,  map then zooms in.

When I call this method from any other position in code(for ex. with button) it works prefectly as well.

What am I doing wrong?


Thanks for reply.

Dec 5, 2011 at 2:32 PM

just move that code to forms load event, because in constructor map size is unknown

Dec 5, 2011 at 2:39 PM

Thanks, it makes sense. I'll try it.