<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MapView.MouseMove Event in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425228#M5146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Morten.&amp;nbsp; So I've attempted to tap into the PanGestureRecognizer and attach that to the MapView both in the code behind and in XAML.&amp;nbsp; It's not firing the PanUpdated event no matter what I do.&amp;nbsp; I am testing on an Android device and I did see another post where someone was saying the map view events were getting swallowed on his Android.&amp;nbsp; No responses on that one though.&amp;nbsp; Based on what you said about how you are wrapping native functionality in your map control am I going to have to do the same thing here and go directly after the Android stuff or am I doing something fundamentally wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;esriUI:MapView x:Name="efMapView" Map="{Binding Map}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="4" WrapAroundMode="EnabledWhenSupported"&amp;gt;&lt;BR /&gt; &amp;lt;esriUI:MapView.GestureRecognizers&amp;gt;&lt;BR /&gt; &amp;lt;PanGestureRecognizer PanUpdated="PanGestureRecognizer_PanUpdated" TouchPoints="1" /&amp;gt;&lt;BR /&gt; &amp;lt;/esriUI:MapView.GestureRecognizers&amp;gt;&lt;BR /&gt; &amp;lt;/esriUI:MapView&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PanGestureRecognizer panGesture = new PanGestureRecognizer();&lt;BR /&gt; panGesture.TouchPoints = 1;&lt;BR /&gt; panGesture.PanUpdated += PanGesture_PanUpdated;&lt;BR /&gt; ApplicationManager.MainMapView.GestureRecognizers.Add(panGesture);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2018 18:11:38 GMT</pubDate>
    <dc:creator>AndyWright</dc:creator>
    <dc:date>2018-06-20T18:11:38Z</dc:date>
    <item>
      <title>MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425226#M5144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our Runtime WPF app we have the ability to tap into MouseMove and TouchMove events on a MapView, so when our users are drawing things on the map and moving the mouse or finger around we can react accordingly.&amp;nbsp; Those events don't seem to be documented in the WPF API docs, but they are there and we are currently using them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those same events are not present in the Xamarin Forms MapView control so we cannot code the same functionality in our Xamarin Forms app that we have in our WPF app.&amp;nbsp; My question is, does anyone know of a slick workaround to track a user's finger (i.e. TouchMove)?&amp;nbsp; It must be possible because the FreehandLine and FreehandPolygon graphic types work that way.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 18:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425226#M5144</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-06-19T18:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425227#M5145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Those events don't seem to be documented in the WPF API docs, but they are there and we are currently using them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's because they are part of WPF, and the MapView control merely inherits them.&amp;nbsp;&lt;A class="link-titled" href="https://msdn.microsoft.com/en-us/library/system.windows.uielement.mousemove%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396" title="https://msdn.microsoft.com/en-us/library/system.windows.uielement.mousemove%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396"&gt;UIElement.MouseMove Event (System.Windows)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;&amp;gt; Those same events are not present in the Xamarin Forms MapView control&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Right. Xamarin.Forms does this quite differently and relies on gesture recognizers, or going to the platform-specific events:&amp;nbsp;&lt;A class="link-titled" href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/" title="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/"&gt;Xamarin.Forms Gestures - Xamarin | Microsoft Docs&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;So luckily the MapView control in Xamarin.Forms inherits the &lt;A href="https://docs.microsoft.com/en-us/dotnet/api/Xamarin.Forms.View.GestureRecognizers?view=xamarin-forms"&gt;GestureRecognizer property&lt;/A&gt; just like the WPF version inherited the events.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt; It must be possible because the FreehandLine and FreehandPolygon graphic types work that way.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our Xamarin.Forms control merely wraps the Android/iOS/UWP native controls, where this is all handled by the native platform's touch events. It does not rely on any Xamarin.Forms APIs to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 22:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425227#M5145</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-06-19T22:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425228#M5146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Morten.&amp;nbsp; So I've attempted to tap into the PanGestureRecognizer and attach that to the MapView both in the code behind and in XAML.&amp;nbsp; It's not firing the PanUpdated event no matter what I do.&amp;nbsp; I am testing on an Android device and I did see another post where someone was saying the map view events were getting swallowed on his Android.&amp;nbsp; No responses on that one though.&amp;nbsp; Based on what you said about how you are wrapping native functionality in your map control am I going to have to do the same thing here and go directly after the Android stuff or am I doing something fundamentally wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;esriUI:MapView x:Name="efMapView" Map="{Binding Map}" Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="4" WrapAroundMode="EnabledWhenSupported"&amp;gt;&lt;BR /&gt; &amp;lt;esriUI:MapView.GestureRecognizers&amp;gt;&lt;BR /&gt; &amp;lt;PanGestureRecognizer PanUpdated="PanGestureRecognizer_PanUpdated" TouchPoints="1" /&amp;gt;&lt;BR /&gt; &amp;lt;/esriUI:MapView.GestureRecognizers&amp;gt;&lt;BR /&gt; &amp;lt;/esriUI:MapView&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PanGestureRecognizer panGesture = new PanGestureRecognizer();&lt;BR /&gt; panGesture.TouchPoints = 1;&lt;BR /&gt; panGesture.PanUpdated += PanGesture_PanUpdated;&lt;BR /&gt; ApplicationManager.MainMapView.GestureRecognizers.Add(panGesture);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 18:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425228#M5146</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-06-20T18:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425229#M5147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be honest, I'm not completely sure. I haven't personally worked much with the Xamarin.Forms events directly (since we've only been using the native events).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But perhaps it's best to take a step back and try and understand why you need to do this in the first place. Maybe there's a better / more direct approach to accomplish what you want to do, without even having to deal with these events directly (and/or perhaps there's a scenario we overlooked that we should make easier). What's the user experience you're trying to build?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:56:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425229#M5147</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-06-20T20:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425230#M5148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our WPF app when the user digitizes a line they can see the next line segment as they move their mouse or finger around the screen.&amp;nbsp; That's custom code by us inside the MouseMove or TouchMove events that draws the polyline from the previous vertex to wherever the user's mouse or finger is on the map as they move it.&amp;nbsp; Works like a charm and our users love it.&amp;nbsp; So now they start to use our Xamarin Forms version and that functionality isn't there.&amp;nbsp; They have to click each vertex before the line starts to appear.&amp;nbsp; Like all good users they won't stand for that sort of inconsistency.&amp;nbsp; So that's the kind of experience we are after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on a potential workaround?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:02:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425230#M5148</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-06-20T21:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425231#M5149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. We are looking at adding that functionality for mouse-move but I'm curious how you'd expect that to work with touch, where dragging your finger across the map will pan it, and vertices are digitized using taps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425231#M5149</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-06-20T21:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425232#M5150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great question.&amp;nbsp; I asked the same to one of our users, but since they get that behavior in WPF with their finger they feel they should have it in iOS and Android as well.&amp;nbsp; I assume we would need to disable the pan map interaction during this line digitizing process and then reenable it when the line is completed.&amp;nbsp; I was actually surprised it worked that way with a finger in WPF.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you come out and say that we flat out can't do it with the current Runtime API, and it sounds like you are, I will at least be able to go back to them with a definitive answer and keep the jackals at bay for a while longer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:18:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425232#M5150</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-06-20T21:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425233#M5151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I was actually surprised it worked that way with a finger in WPF.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So am I. It shouldn't &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;So if you come out and say that we flat out can't do it with the current Runtime API&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's probably some tricky way it can be accomplished, but Xamarin.Forms sure doesn't make it easy. I personally wouldn't recommend disabling pan, because that forces the user to be zoomed rather far out when digitizing to see the entire area, and that reduces accuracy significantly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425233#M5151</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-06-20T21:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.MouseMove Event</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425234#M5152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed, so it quickly becomes a awkward user experience.&amp;nbsp; I'm going to go back to them and tell them it can't be done right now.&amp;nbsp; Thanks for all your insight here Morten ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/mapview-mousemove-event/m-p/425234#M5152</guid>
      <dc:creator>AndyWright</dc:creator>
      <dc:date>2018-06-20T21:25:26Z</dc:date>
    </item>
  </channel>
</rss>

