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.
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.
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;
}
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.
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.