//when you long click the map, delete polygon public void longClick(object sender, GoogleMap.MapLongClickEventArgs e) { map.setPolygonPoints(0); map.ShapeCoordinates.Clear(); polygon.Remove(); clearShapeMarkers(); }
private void googleMap_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { ((MapExtension)Element).OnMapLongTouch(new Position(e.Point.Latitude, e.Point.Longitude)); // display the new pin //UpdatePins(); }
private async void ShowPOI(object sender, GoogleMap.MapLongClickEventArgs e) { foreach (var point in pointsOfInterest) { point.Remove(); } pointsOfInterest.Clear(); LatLngBounds bounds = e.Point.GetBoundingBox(8000); var geocoder = new Geocoder(this); var results = await geocoder.GetFromLocationNameAsync("Starbucks", 5, bounds.Southwest.Latitude, bounds.Southwest.Longitude, bounds.Northeast.Latitude, bounds.Northeast.Longitude); foreach (var result in results) { var markerOptions = new MarkerOptions() .SetIcon(BitmapDescriptorFactory.DefaultMarker(BitmapDescriptorFactory.HueCyan)) .SetPosition(new LatLng(result.Latitude, result.Longitude)) .SetTitle(result.FeatureName) .SetSnippet(GetAdress(result)); pointsOfInterest.Add(map.AddMarker(markerOptions)); } }
void Map_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { MarkerFactory(e.P0); _viewModel.LocationEntity.Add(new LocationEntity() { Latitude = e.P0.Latitude, Longitude = e.P0.Longitude }); }
/// <summary> /// When a long click was performed on the map /// </summary> /// <param name="sender">Event Sender</param> /// <param name="e">Event Arguments</param> private void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { if (this.FormsMap == null || this.FormsMap.MapLongPressCommand == null) { return; } var position = e.Point.ToPosition(); this.MapFunctions.RaiseMapLongPress(position); }
private void _map_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { markerPosition = e.Point; MarkerOptions markerOptions = new MarkerOptions() .SetPosition(markerPosition) .SetTitle("Sleep naar je voertuig") .Draggable(true); map.AddMarker(markerOptions); }
private void GoogleMap_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { MarkerOptions markerOpt1 = new MarkerOptions(); _markerPosition = new Coordinates { Latitude = e.Point.Latitude, Longtitute = e.Point.Longitude, PlaceName = "Unknown" }; SetMarker(e.Point); }
private void _map_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { MarkerOptions markerOptions = new MarkerOptions() .SetPosition(e.Point) .SetTitle("Hier staat je voertuig") .SetSnippet($"Lat {e.Point.Latitude} Long {e.Point.Longitude}") .Draggable(true); map.AddMarker(markerOptions); markersList.Add(e.Point); }
void ClickingLongMap(object sender, GoogleMap.MapLongClickEventArgs e) { System.Diagnostics.Debug.WriteLine("Clicked looogly on the map"); var marker = new MarkerOptions(); marker.Draggable(true); marker.SetPosition(new LatLng(e.Point.Latitude, e.Point.Longitude)); formsMap.MarkerPosition = new Position(marker.Position.Latitude, marker.Position.Longitude); System.Diagnostics.Debug.WriteLine("pin starting latitude" + e.Point.Latitude); NativeMap.AddMarker(marker); }
private void MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { var pin = new CustomPin { Type = PinType.Place, Address = "Test address", Label = "Test Lable", Position = new Position(e.Point.Latitude, e.Point.Longitude), Id = "Xamarin", Url = "http://xamarin.com/about/" }; customPins.Add(pin); }
/// <summary> /// When a long click was performed on the map /// </summary> /// <param name="sender">Event Sender</param> /// <param name="e">Event Arguments</param> private void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { if (this.FormsMap == null || this.FormsMap.MapLongPressCommand == null) { return; } var position = e.Point.ToPosition(); if (this.FormsMap.MapLongPressCommand.CanExecute(position)) { this.FormsMap.MapLongPressCommand.Execute(position); } }
void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { var shouldAdd = PreferenceManager.GetDefaultSharedPreferences(this) .GetBoolean(SettingsScreen.AddMarkerOnLongTap, SettingsScreen.AddMarkerOnLongTapDefaultValue); if (shouldAdd && Mode == Mode.None) { Mode = Mode.Add; MapClickWhileAddMode(e.Point); GoogleAnalyticsManager.ReportEvent(GACategory.MainScreen, GAAction.Click, "map long click used to add alarm"); } }
private void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { _map.Clear(); var position = new Position(e.Point.Latitude, e.Point.Longitude); ((CustomMap)Element).OnTap(position); ((CustomMap)Element).IsNetworkConnected(MainActivity.IsNetworkConnected()); var marker = CreateMarker(new Pin() { Position = position }); _map.AddMarker(marker); }
private void GMapLongClickEvent(object sender, GoogleMap.MapLongClickEventArgs e) { if (STATUS_GUI == StatusGUI.DesenhandoCaminho) { if (UltimoPontoInteracao == null) { //Colocar novo ponto ColocarNovoPontoMapa(e.Point, (LatLng)null, EstacionamentoSelecionado); } else { //colocar novo ponto a partir do ultimo interagido ColocarNovoPontoMapa(e.Point, UltimoPontoInteracao.Position, EstacionamentoSelecionado); } } }
async void MarkAddress(object sender, GoogleMap.MapLongClickEventArgs e) { markedAddresses.ForEach(m => m.Remove()); markedAddresses.Clear(); var geocoder = new Geocoder(this); var results = await geocoder.GetFromLocationNameAsync(addressSearchTerm, 5); foreach (var result in results) { var markerOptions = new MarkerOptions() .SetIcon(BitmapDescriptorFactory.DefaultMarker(BitmapDescriptorFactory.HueCyan)) .SetPosition(new LatLng(result.Latitude, result.Longitude)) .SetTitle(result.FeatureName) .SetSnippet(GetAddress(result)); markedAddresses.Add(map.AddMarker(markerOptions)); } }
private void GoogleMap_MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { MapLongClicked?.Invoke(this, new MapClickedEventArgs( new Position(e.Point.Latitude, e.Point.Longitude))); }
protected void MapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { }
void OnMapLongClick(object sender, GoogleMap.MapLongClickEventArgs e) { AddMarker($"{e.Point.Latitude},{e.Point.Longitude}", e.Point); }