Skip to content

Commit

Permalink
Add some api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldendulk committed Feb 16, 2025
1 parent 1830827 commit 7de7267
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Mapsui/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Mapsui.Extensions;
using Mapsui.Fetcher;
using Mapsui.Layers;
using Mapsui.Logging;
using Mapsui.Styles;
using Mapsui.Widgets;
using Mapsui.Widgets.InfoWidgets;
Expand Down Expand Up @@ -43,9 +42,21 @@ public Map()
Navigator.ViewportChanged += Navigator_ViewportChanged;
}

/// <summary>
/// Event that is triggered when the map is tapped. Can be a single tap, double tap or long press.
/// </summary>
public Func<Map, MapEventArgs, bool> Tapped { get; set; } = (s, e) => false;
/// <summary>
/// Event that is triggered when on pointer down.
/// </summary>
public Func<Map, MapEventArgs, bool> PointerPressed { get; set; } = (s, e) => false;
/// <summary>
/// Event that is triggered when on pointer move. Can be a drag or hover.
/// </summary>
public Func<Map, MapEventArgs, bool> PointerMoved { get; set; } = (s, e) => false;
/// <summary>
/// Event that is triggered when on pointer up.
/// </summary>
public Func<Map, MapEventArgs, bool> PointerReleased { get; set; } = (s, e) => false;

private void Navigator_ViewportChanged(object? sender, ViewportChangedEventArgs e)
Expand Down Expand Up @@ -424,6 +435,5 @@ public bool UpdateAnimations()
HorizontalAlignment = HorizontalAlignment.Stretch,
BackColor = Color.Transparent,
Opacity = 0.0f,
LogLevelFilter = LogLevel.Trace,
};
}

0 comments on commit 7de7267

Please sign in to comment.