I've dropped a TapGestureRecognizer onto a Map in hopes of being able to trigger a legend_close method. It doesn't trigger (iOS or Android).
<AbsoluteLayout VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<renderers:OutageMap x:Name="OutageMap"
MapType="Street"
IsShowingUser="False"
HasZoomEnabled="True"
EnablePolygons="{Binding EnablePolygons}"
OutageSource="{Binding Outages}"
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
AbsoluteLayout.LayoutFlags="All">
<renderers:OutageMap.GestureRecognizers>
<TapGestureRecognizer Tapped="OnMapTapped_CloseLegend"></TapGestureRecognizer>
</renderers:OutageMap.GestureRecognizers>
</renderers:OutageMap>
<controls:_OutageLegend AbsoluteLayout.LayoutBounds="0, 0, -1,-1"
AbsoluteLayout.LayoutFlags="PositionProportional"
x:Name="LegendContainer" />
<ActivityIndicator IsRunning="{Binding IsBusy}"
IsVisible="{Binding IsBusy}"
AbsoluteLayout.LayoutBounds="0.5, 0.5, -1,-1"
AbsoluteLayout.LayoutFlags="PositionProportional"/>
</AbsoluteLayout>
Since a map tracks touches in other ways, is this just not possible? I've looked around a bit, and the only thing I've found is an old bug in a NEEDINFO
state.