ThinkGeo.com    |     Documentation    |     Premium Support

Client side controlling Map OnClick post back

I need to be able to allow the user to Pan around the map using their mouse and to be able to click on a feature and post back to the server.


I thought about having a "pan button",  turning on a pan only mode and a "select feature button", turning on the map onClick event.


Easier said than done. I've tried doing this client side with a form on click event - but it seems like the map is setup in an iframe which I can't control. I have tried doing this server side - with not setting up the onClick event - but as long as I have a method that handles.Map1.Click posts back anyway.


Any Ideas?


Thanks! Cyndi Pruett



Cydni,  
  
 Thanks for the post! 
  
 We have made some improvements for this situation in the new beta which will be released in about two weeks.  
  
 In the new Beta, Pan does not conflict with MouseClick event, which means you do not need “Pan only mode” and “select feature mode". You can click on the map to raise the click event while panning will not raise that event. 
  
 Also, in the new Beta, we provide Map.DoubleClick event, that’s another option you can choose for your application.  
  
 By the way, there will be a sample in “Samples” -> “Getting Started” -> “Add a Click Event” to show you how to use this feature. As there are still a couple weeks ahead for the next Beta, we might have some name changes when we final release. 
  
 Ben.