SharpMap with Mouse Events

Topics: SharpMap Project, SharpMap v0.9 / v1.x, Web Controls
Dec 1, 2008 at 2:12 AM
I have started using SharpMap recently and was trying to implement the Mouse Events in the web application. Could anyone assist me on how to implement the same?
Currently im using   <asp:ImageButton this control to display my map but im not able to capture the mouse events, Im using Shapefiles and also trying to add GPS Data dynamically in the map but click of a button.

Looking forward for some reply

 

Coordinator
Dec 1, 2008 at 7:40 AM
Edited Dec 1, 2008 at 7:40 AM
Hi arunachalamt, you will only be able to recieve Click events server side when the page is posted back (http://msdn.microsoft.com/en-us/library/system.web.ui.imageclickeventargs.aspx). All other events must be hooked via javascript in the browser using Html Dom properties such as onmouseover, onmouseout etc. You may find it easier to proceed using either the ajax control or a javascript library such as Open Layers. hth jd
Dec 1, 2008 at 7:48 AM
Thanks alot John, As you said i already done the click event but i was trying to implement the Zoom-In and Zoom-Out methods by drawing a box which will be possible only if mouse events can be handled. As you suggest i have tried using ajax control but couldn't really make it running. It will be really nice if you can provide me a sample code how to implementing ajax control.
Coordinator
Dec 1, 2008 at 8:01 AM
There is an Ajax demo in the DemoWebSite project in the trunk of the source code. hth jd
Dec 1, 2008 at 8:34 AM
Thanks alot for your suggestion and help. As you must be knowing im new to SharpMap, the basic need for me is to implement a real time tracking application.
The system should be able to add points on the map from a table dynamically, i have managed to do it in a simple map but could i do the same using ajax control?
Coordinator
Dec 1, 2008 at 1:35 PM
It is definately possible..