Refresh map

Jan 8, 2007 at 8:02 AM
I'm newbi, i want ta add a button in my page, to refresh map but i don't known how to implement. Help me.
Jan 9, 2007 at 3:07 AM
I newbie too, but if you use a DemoWebSite, try with:
protected void Button1_Click(object sender, EventArgs e)
myMap.Center = new SharpMap.Geometries.Point(YourDefaultXCenter, YourDefaultYCenter);
myMap.Zoom = YourDefaultZoom;
Sorry my bad English.
Regards from Argentina.
Jan 9, 2007 at 3:17 AM
Or simply call GenerateMap() if only it wants to refresh the map in the current position. But, why did you want to do it?. Does not it manage to show the map due to the time of delay?. Did it try to use Ajax?
Jan 10, 2007 at 12:50 AM
Thanks you!
But i want to use ajax but i don't know how to use. Specially, i donn't know to implement under Client (.aspx) and Server (.cs). Now, when i click "refresh button" then refresh total page, i want to refresh only refresh Ajaxmapcontrol object. Help me.

Help me to help every body!
Jan 10, 2007 at 11:37 AM
I newbie in Javascript and C#. I it am sorry not to be able to help adequately, but your problem I resolved using ASP.Net Ajax and calling, for example, a PageMethod seemed a PageLoad (server side). I think that it might help use him a SharpMapBeginRefreshMap function in JavaScript changing the values of x, y and zoom in the obj.
See de SharpMap_BeginRefreshMap (and others) in the source code SharpMap\SharpMap.UI\Web\UI\Ajax\AjaxMap.js
I use this funtion when clicked a new point, see this post:
Jan 12, 2007 at 12:18 AM
Thanks, i finished.
Thanh Son
Viet Nam