1using CommunityToolkit.Mvvm.ComponentModel;
2using CommunityToolkit.Mvvm.Input;
6using Mapsui.Projections;
15 public MapControl? MapControl {
get;
set; }
22 public GeoMapViewModel(
double? Latitude =
null,
double? Longitude =
null)
24 if (Latitude.HasValue && Longitude.HasValue)
29 public async Task Confirm()
31 if (MapControl?.Map?.Navigator.Viewport is
null)
33 this.TrySetResult(
null);
38 var vp = MapControl.Map.Navigator.Viewport;
40 var (lon, lat) = SphericalMercator.ToLonLat(vp.CenterX, vp.CenterY);
41 this.TrySetResult($
"{lon},{lat}");
Base class that references services in the app.
static IPopupService PopupService
Popup service for presenting application popups.
Contains information about a position in a geo-spatial coordinate system.