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

AjaxMapControl Zoom problem

Oct 2, 2006 at 9:56 AM
I downloaded the Ajax demo project, and based on it, I load my own data from PostGis, and try to show it with AjaxMapControl.

When I click on the control to zoom in, the center will change and I give another coordinate...

I don't know why this is happening. I use another coordinate system, than the WGS. Is this the source of my problem?

Should I rewrite the maphandler.asmx file?

Thanks if you have any idea.

Oct 3, 2006 at 4:04 PM
Fortunately I found the solution:

SharpMap.Geometries.BoundingBox mapExtents = ajaxMap.Map.GetExtents();
ajaxMap.Map.Zoom = mapExtents.Width;
ajaxMap.Map.Center = mapExtents.GetCentroid();

These rows helped me a lot.