Upgrading from 10.1 - MouseOver, Animated Symbols

474
1
09-15-2017 11:45 AM
DenisO_Connor
New Contributor

Currently trying to 'upgrade' from 10.1 to 100.1 - some surprising missing functionality...

a) Mouse Over graphics event has been omitted in 100.1. MouseOver is a fundamental expectation in user functionality and it is difficult to understand how a decision was made to omit this from 100.1 which is intended to be an upgrade from the original 'basic' model 10.1. A workaround has been suggested on the Forum to detect for Mouse stopped moving through various timer techniques.

b) We used Animated Strobe Symbols very effectively in 10.1 to highlight selected Symbols via XAML Storyboard and MarkerSymbol.ControlTemplate. We see on Forum that ControlTemplate has been omitted in 100.1 and therefore Animated Symbol feature not possible. As this was a very important feature for our application, we experimented to find a workaround - this technique works surprisingly well and it is not possible to detect the difference from the original Animated Symbol..
a) Generate the Animated Symbol within a WPF User Control
b) When Graphic is selected via GeoViewTapped or code selection, detect Coordinates of Graphic - Convert to Screen Coordinates - position WPF User Control on the screen point - this is effectively sitting on top of the MapView.
c) On ViewPointChanged - read the Selected Graphic screen coordinates and re-position the WPF UserControl to follow it.

0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor

10.1 used XAML to render the features. This had the downside of being terrible slow and couldn't handle the amount of data users expected us to. We since moved to render solely using DirectX. That's why you can't use XAML to declare symbols any longer. The mouse over events was simple a free "gift" from XAML. We are looking at ways to bring something like this back in the future without hurting performance, but hit testing on mouse move can become quite expensive and drain your battery, so we really advise against it. 

Also XAML symbols don't fit well into the ArcGIS system - it's not a symbol that's sharable across all the different runtimes, webapis and desktop products, and we want to rely on symbol models that everyone can understand and reuse.

Wrt to aligning view controls on top of the map, you can use the MapView.Overlays collection for this, or simply use the ShowCallout* methods. We'll then take care of repositioning.

0 Kudos