void OnInfoWindowClose(object sender, GoogleMap.InfoWindowCloseEventArgs e)
        {
            // lookup pin
            var targetPin = LookupPin(e.Marker);

            try
            {
                _onMarkerEvent = true;
                if (targetPin != null && ReferenceEquals(targetPin, Map.SelectedPin))
                {
                    Map.SelectedPin = null;
                }
            }
            finally
            {
                _onMarkerEvent = false;
            }
        }
        void MapOnInfoWindowClose(object sender, GoogleMap.InfoWindowCloseEventArgs eventArgs)
        {
            System.Diagnostics.Debug.WriteLine("MapOnInfoWindowClose");
            var map = (Map)Element;

            // clicked marker
            var marker = eventArgs.Marker;

            // lookup pin
            Pin targetPin = null;

            for (var i = 0; i < Map.Pins.Count; i++)
            {
                var pin = Map.Pins[i];
                if (((Marker)pin.Id).Id != marker.Id)
                {
                    continue;
                }

                targetPin = pin;
                break;
            }

            try
            {
                _onMarkerEvent = true;
                if (targetPin != null && object.ReferenceEquals(targetPin, map.SelectedPin))
                {
                    map.SelectedPin = null;
                }
            }
            finally
            {
                _onMarkerEvent = false;
            }
        }
示例#3
0
 private void InfoWindowClose(object sender, GoogleMap.InfoWindowCloseEventArgs e)
 {
     _infoWindowAdapter.Duration = null;
     OnPushpinUnselected(FormsMap.CurrentPushpin);
 }
 void OnInfoWindowClose(object sender, GoogleMap.InfoWindowCloseEventArgs e)
 {
     CurrentPinWindow = null;
 }
 private void InfoWindowClose(object sender, GoogleMap.InfoWindowCloseEventArgs e)
 {
     _infoWindowAdapter.CurrentIncident = null;
     OnIncidentUnselected(FormsMap.CurrentIncident);
 }