How can I create clickable map on pocket pc?

Topics: General Topics
Dec 24, 2006 at 7:13 AM
Hi, im using SharpMap for .NET Compact Framework (pocketPC) and I follow this code

protected void imgMap_Click(object sender, ImageClickEventArgs e)
{
//Center the map on the click-point
myMap.Center = myMap.ImageToWorld(new System.Drawing.Point(e.X, e.Y), myMap);
//Zoom in 2x
myMap.Zoom *= 0.5;
//Call function that renders the map and returns it to the client
myImage.Image = myMap.GetMap();
}

But there is not have ImageClickEventArgs in .NET Compact Framework.How Can I fix it?
Please Help me.. I am newbie in this
Dec 24, 2006 at 3:58 PM
ImageClickEventArgs relates to System.Web.HtmlInputImage and System.Web.ImageButton. You are not trying to use web controls on a pocket pc are you?
Dec 25, 2006 at 4:04 AM
Thanks for the reply, but System.Web.UI.HtmlControls.HtmlInputImage and System.Web.UI.WebControls.ImageButton are in system.web.dll which not support .NET Compact Framework.Do I understand correct ?

Dec 25, 2006 at 8:08 AM
System.Web is for ASP.NET webpages !!!
Dec 25, 2006 at 8:27 AM
Thank you,and Can anyone suggest another solution to create clickable map on pocket pc?
Dec 25, 2006 at 11:51 AM
Sorry, I not nothing of ppc, but You You will have read this post? <a
href="http://www.codeplex.com/SharpMap/Project/DisplayThread.aspx?ForumId=394&ThreadId=891&ANCHOR">http://www.codeplex.com/SharpMap/Project/DisplayThread.aspx?ForumId=394&ThreadId=891&ANCHOR</a> (download sharpmapmobile).
Sorry my bad English.
Regards from Argentina.
/Leandro
Dec 25, 2006 at 3:49 PM
Hi, i think you have the solution in the code fragment you posted.

e.X, e.Y, give you the screen coordinates of the clicked point. You can map those on any layer you have inside your Map object.

Dec 25, 2006 at 6:34 PM
http://msdn2.microsoft.com/en-us/library/z89a4506.aspx