Leandro Hernan Rojas 319f7234c5
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m16s
Update ADD PhMap, Institutions and Patients
2025-04-21 19:41:26 -03:00

25 lines
735 B
C#

using Microsoft.JSInterop;
using phronCare.UIBlazor.Shared.Components;
namespace phronCare.UIBlazor.Shared.Services
{
public static class MapInterop
{
private static PhMap? CurrentInstance;
public static void RegisterInstance(PhMap instance)
{
CurrentInstance = instance;
}
[JSInvokable("NotifyLocationChanged")]
public static async Task NotifyLocationChanged(double lat, double lng)
{
if (CurrentInstance is not null)
{
CurrentInstance.Latitude = lat;
CurrentInstance.Longitude = lng;
await CurrentInstance.OnLocationChanged.InvokeAsync((lat, lng));
}
}
}
}