예제 #1
0
        private async Task HandleIncidentSelection(IncidentModel incident)
        {
            if (CurrentUserStatus.CanNavigate)
            {
                RouteManager.ClearAllUserRoutes();
            }

            if (incident != null)
            {
                PushpinManager.ShowIncidentInformationPanel(incident);
                FormsMap.SetPosition(incident.GeoLocation);

                if (CurrentUserStatus.CanNavigate)
                {
                    await RouteManager.DrawRouteToIncident(incident);
                }
            }
            else
            {
                PushpinManager.HideIncidentInformationPanel();
                PushpinManager.SetInteraction(true);
                if (CurrentUserStatus.IsAttendingAnIncident)
                {
                    ResponderManager.DismissCurrentUserIncident();
                }
            }
        }
        private async Task HandleIncidentSelection(CustomPin pushpin)
        {
            await Task.Delay(0);

            if (pushpin != null)
            {
                PushpinManager.ShowPushpinInformationPanel(pushpin);
                FormsMap.SetPosition(pushpin.Position);
            }
            else
            {
                PushpinManager.HidePushpinInformationPanel();
                PushpinManager.SetInteraction(true);
            }
        }