I am currently using NET SDK 10.0.5 and using the latest MAUI controls 10.0.51. Whenever attaching the MapView to PointerGestureRecognizer it appears to not send across the events for PointerMoved and PointerReleased. I do know there was a bug fix to address this issue inside of MAUI. I assume we will have to wait until ESRI has those MAUI controls added to them (>= 10.0.5). I thought I would at least post the issue in here in case it is something else.
This is the main page xaml:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
x:Class="MauiTemplate.Pages.MainPage">
<esri:MapView>
<esri:MapView.GestureRecognizers>
<PointerGestureRecognizer
PointerMoved="PointerGestureRecognizer_OnPointerMoved"
PointerReleased="PointerGestureRecognizer_OnPointerReleased"/>
</esri:MapView.GestureRecognizers>
</esri:MapView>
</ContentPage>
This is the xaml code behind:
using System.Diagnostics;
namespace MauiTemplate.Pages;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void PointerGestureRecognizer_OnPointerMoved(object? sender, PointerEventArgs e)
{
Debug.WriteLine("Moved");
}
private void PointerGestureRecognizer_OnPointerReleased(object? sender, PointerEventArgs e)
{
Debug.WriteLine("Released");
}
}
What you will see is that on iOS the debug messages are seen in the logs, while on Android those events are never received. I believe this is related to the fix in 10.0.5 and here is a link to the original issue that was filed: https://github.com/dotnet/maui/releases/tag/10.0.50. If there is a known work around please let me know otherwise, we can wait until ESRI catches up to NET 10 and those control versions.
I am currently using NET SDK 10.0.5 and using the latest MAUI controls 10.0.51. Whenever attaching the MapView to PointerGestureRecognizer it appears to not send across the events for PointerMoved and PointerReleased. I do know there was a bug fix to address this issue inside of MAUI. I assume we will have to wait until ESRI has those MAUI controls added to them (>= 10.0.5). I thought I would at least post the issue in here in case it is something else.
This is the main page xaml:
This is the xaml code behind:
using System.Diagnostics;
namespace MauiTemplate.Pages;
What you will see is that on iOS the debug messages are seen in the logs, while on Android those events are never received. I believe this is related to the fix in 10.0.5 and here is a link to the original issue that was filed: https://github.com/dotnet/maui/releases/tag/10.0.50. If there is a known work around please let me know otherwise, we can wait until ESRI catches up to NET 10 and those control versions.