Register  |  Login
ThinkGeo - GPS Tracking and Mapping Solutions  |  Visit the Wiki  |  Find us on: Twitter Facebook Google+ LinkedIn

Discussion Forums

The online community for users of Map Suite GIS components

MapClickWpfMapEventArgs position different for left and right
Last Post 08-16-2010 02:17 PM by Val. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
KlausUser is Offline
Level 4
Level 4
Posts:324
Avatar

--
08-16-2010 08:20 AM

Folks,

An instance of MapClickWpfMapEventArgs returns invalid screen and world positions for right mouse click.  I expected this class to return similar position results for left and right mouse clicks.  Is there a reason for this?

Thanks.

 

ValUser is Offline
MVP
MVP
Posts:1634
Avatar

--
08-16-2010 11:14 AM

 We are going to need more information from you. I tested on my side with the code below and I don't see anything unexpected in the MapClickWpfMapEventArgs.

 


private void LoadPost7998()
{
    wpfMap1.MapUnit = GeographyUnit.DecimalDegree;

    wpfMap1.MapClick += new EventHandler<MapClickWpfMapEventArgs>(wpfMap1_MapClick);

    WorldMapKitWmsWpfOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsWpfOverlay();
    wpfMap1.Overlays.Add(worldMapKitDesktopOverlay);

    wpfMap1.CurrentExtent = new RectangleShape(-98, 48, -75, 0);
    wpfMap1.Refresh();
}

void wpfMap1_MapClick(object sender, MapClickWpfMapEventArgs e)
{
    //WorldX and WorldY values are consistent whether right clicked or left clicked.
    double worldX = e.WorldX;
    double worldY = e.WorldY;

    //ScreenX and ScreenY values are consistent whether right clicked or left clicked.
    float screenX = e.ScreenX;
    float screenY = e.ScreenY;
}
KlausUser is Offline
Level 4
Level 4
Posts:324
Avatar

--
08-16-2010 12:41 PM

Val, maybe I need to get the new daily build but before I do so, try your test with DLL versions 4.0.100.0 and let me know. I am not doing anything fancy but just handling the event and looking at the debugger. 

ValUser is Offline
MVP
MVP
Posts:1634
Avatar

--
08-16-2010 02:17 PM
It is very possible that there was a bug in earlier versions and that it is fixed now. Please, go to Help Desk and get the latest Daily Production dll package to have the latest version with the fixes. Thank you.
You are not authorized to post a reply.

Active Forums 4.2