我需要在我的應用程序中進入和退出通知。所以我寫下了相同的代碼,並且按預期工作。但我想檢查多個覆蓋或區域。針對xamarin ios的多個區域的地理柵欄
對於一個例子,我已經設置了3個覆蓋圖或具有特定座標的區域。我想查看用戶當前位置附近區域的入口和出口。
if (pointregion.ContainsCoordinate(location.Coordinate) && Entryregion == false)
{
Entryregion = true; Exitregion = false;
ShowNotification("You are just in " + pointregionname + " region", "Alert");
}
if (!pointregion.ContainsCoordinate(location.Coordinate) && Entryregion == true)
{
Entryregion = false; Exitregion = true;
ShowNotification("You are just left " + pointregionname + " region", "Alert");
}