This project has moved and is read-only. For the latest updates, please go here.

ZoomToBox() not working

Topics: SharpMap Project, Web Controls
Jul 13, 2009 at 9:47 AM

Hi there.

I am using the AjaxMap control in a web application, I have added the necessary layers and everything seems to be just fine. Except; I can't seem to set an initial center point for the map. I have tried using:


Dim centerPoint As New SharpMap.Geometries.Point(34.7168, 39.34204)
map.Center = centerPoint

and that did not work (which I believe should! I insert a MsgBox(map.Center) into my code and the alerted value is correct. Still the map does not center on where I want it to). Some research led me to the usage of 



which seems more accurate according to my needs, but again the map center is not set at all! Even when I use this code, the zoom level is the maximum zoom level, and the map is displaying the maximum extents possible (-180 -> 180 in x coordinates). 

Can someone please point out what exactly am I doing wrong?