Esri / coordinate-conversion-addin-dotnet

Addin for ArcMap and Pro for convenient coordinate conversion in Desktop.
Apache License 2.0
45 stars 20 forks source link

Map Point and Select Point Tools broken after Pro build 2.4.19824 #610

Closed csmoore closed 5 years ago

csmoore commented 5 years ago

The CC Map Point and Select Point Tools seem to be broken on Pro builds after 2.4.19843

Repro steps:

  1. Install Pro 2.4.19824 or later
  2. Install CC Addin
  3. Attempt to use either the Map Point or Select Point Tools
  4. Click on the map, the cursor changes to the cursor below (instead of the correct Tool crosshair cursor) and the map just flashes white when clicked on

Cursor: image

image

@ljuru and @dfoll noticed this testing. Tested on ArcGISPro.2.4.19843 - ArcGISPro2.4.19854

Research so far:

  1. I traced the problem down to the Tool's OverlayControl no longer working.
  2. I tested the SDK Tool Overlay sample and this is working fine: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/MapToolWithOverlayControl (but this sample is much simpler than what we have going on with the CC Tool's Flash Animation)
  3. At this point, I'm still not sure what recent Pro change may have broken this so we may need some support from Core on this
csmoore commented 5 years ago

Update: after some investigation, it appears that the cursor shown image

is a spurious resize cursor for the the Tool's Overlay - but OverlayControlCanResize = false so not sure why this cursor is now showing up and intercepting map clicks, seems like a new SDK bug.

csmoore commented 5 years ago

Emailed Core with OverlayControl issue:

After Pro Build 2.4.19843 (5/21), the MapTool OverlayControl now always shows a resize cursor and intercepts our mouse clicks (so no map clicks make it to the tool). 

OverlayControlCanResize = false so not sure why this resize behavior and cursor is now showing up in Pro 2.4 and intercepting map clicks, seems like possibly a new bug.  
csmoore commented 5 years ago

We've had some back-and-forth with the SDK team to try to explain the issue and determine the cause. @ljuru determined that the coordinate map tool stopped working between builds 19823 (worked) and 19824 (stopped working) so the SDK team is going to see what may have changed between these builds to affect this.

csmoore commented 5 years ago

The SDK Team was extremely helpful in helping us to identify what was happening with the Map Tool Embedded Control Overlay.

Just to summarize the discussions:

  1. The Map Tool Embedded Control Overlay was never really intended to be used the way we are using it, as a Canvas that covers the map and allows mouse clicks to be passed through, a. The reason ours worked was just a coincidence of timing that set the overlay size to 0,0 at startup (because the View was not yet visible), a bug fix at 2.4 changed this sequence so the view was visible and the full size of the canvas was correctly being set
  2. At Pro 2.1 another more general purpose control was added the MapView Overlay Control, but we found that this too intercepts mouse clicks - so a change is being added to 2.5 to allow mouse clicks through to the map if the control is not hit test visible - to support this case of a full map overlay that also has map interaction.

So for now, the least risky approach was for us to just make a minor tweak to restore the control/canvas to its pre 2.4 behavior (return a size of 0,0, until we want to play the animation)

This change/fix was added in PR #613 (tested on 2.2 and 2.4 Beta 2) and ready for QC

ljuru commented 5 years ago

tested the map point tool and flashing on Pro 2.2, 2.3 and 2.4 build number: 19921