Hi,
I want to change the cursor to ‘wait’ while the SQL server query is running and new features are created.
Of course the code below is not working. How can I change the cursor to show the user, query is still in process ?
protected void Map1_Click(object sender, ThinkGeo.MapSuite.WebEdition.MapClickedEventArgs e)
{
Map1.Cursor = CursorType.Wait;
// At this point I have to query some data and show new created features on the map, it takes 5 sec
System.Threading.Thread.Sleep(5000);
Map1.Cursor = CursorType.Default;
Thanks,
Nora
How to change cursor to 'wait' after Map1_click event
Hi, Nora
Welcome to ThinkGeo Discussion Forums. Thanks for your information about this post.
There are two solutions for your problem. One is to use Callback mechanism and update the cursor type before quest is sent and after the response from server comes.
Another option is to register OnClientClick event on the map control named “SetCursorType” or others you want and update the cursor type in this client function. The code likes below:
function SetCursorType() {
<%=Map1.ClientID %>.GetMapParser().map.div.style.cursor = “Wait”;
}
Map1 is the ID of map control. And after that, you can change the cursor type to Default after query has been finished. There is one limitation, and you can’t put the map control into UpdatePanel ajax control.
Hope it could help you.
Thanks,
Khalil