Zoom displayed markers

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

Hello,

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 3:32 PM

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

Dec 5, 2011 at 3:39 PM

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