void OnMarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { if (_draggingPin != null) { UpdatePositionWithoutMove(_draggingPin, e.Marker.Position.ToPosition()); Map.SendPinDragging(_draggingPin); } }
private void OnMarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { if (draggingPin == null) { return; } UpdatePositionWithoutMove(draggingPin, e.Marker.Position.ToPosition()); Map.SendPinDragging(draggingPin); }
/// <summary> /// Dragging process /// </summary> /// <param name="sender">Event Sender</param> /// <param name="e">Event Arguments</param> private void OnMarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { var item = this._markers.SingleOrDefault(i => i.Value.Id.Equals(e.Marker.Id)); if (item.Key == null) { return; } item.Key.Position = e.Marker.Position.ToPosition(); }
private void _mapa_MarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { _linhaBuracoMeio?.Remove(); _linhaBuracoMeio = _mapa.AddPolyline(new PolylineOptions().Add(_buracoMarker.Position, _meioMarker.Position).InvokeWidth(4)); _linhaTeeMeio?.Remove(); _linhaTeeMeio = _mapa.AddPolyline(new PolylineOptions().Add(_meioMarker.Position, _teeMarker.Position).InvokeWidth(4)); if (e.Marker.Equals(_teeMarker)) { _customMap.TeePinPosicao = new Position(e.Marker.Position.Latitude, e.Marker.Position.Longitude); } else if (e.Marker.Equals(_meioMarker)) { _customMap.MeioPinPosicao = new Position(e.Marker.Position.Latitude, e.Marker.Position.Longitude); } }
private void MMap_MarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { LatLng pos = e.Marker.Position; Console.WriteLine(pos.ToString()); }
private void Map_MarkerDrag(object sender, GoogleMap.MarkerDragEventArgs e) { //implement your marker drag event here }