protected override MarkerOptions CreateMarker(Pin pin) { MarkerOptions marker = new MarkerOptions(); double la = 37.008503; double lo = -127.810804; marker.SetPosition(new LatLng(la, lo)); marker.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.pinWhite)); return(marker); }
public void OnMapReady(GoogleMap googleMap) { for (int i = 0; i < latitudes.Length; i++) { MarkerOptions options = new MarkerOptions(); options.SetPosition(new LatLng(latitudes[i], longitudes[i])); googleMap.AddMarker(options); } }
public static MarkerOptions CreateUserDragable() { MarkerOptions mo = new MarkerOptions(); LatLng position = new LatLng(ConfigManager.DefaultLatMap, ConfigManager.DefaultLongMap); mo.SetPosition(position); mo.Draggable(true); return(mo); }
public void UserOffRoute(Location p0) { origin = Point.FromLngLat(lastLocation.Longitude, lastLocation.Latitude); GetRoute(origin, destination); Snackbar.Make(contentLayout, "User Off Route", Snackbar.LengthShort).Show(); var marker = new MarkerOptions(); marker.SetPosition(new LatLng(p0.Latitude, p0.Longitude)); mapboxMap.AddMarker(marker); }
protected override MarkerOptions CreateMarker(Pin pin) { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude)); marker.SetTitle(pin.Label); marker.SetSnippet(pin.Address); marker.SetIcon(BitmapDescriptorFactory.FromAsset("BusStop_blue.png")); return(marker); }
private void DrawOnMap(GoogleMap map, LatLng latLng, string title) { MarkerOptions marker = new MarkerOptions(); marker.SetPosition(latLng); marker.SetTitle(title); map.AddMarker(marker); map.MoveCamera(CameraUpdateFactory.NewLatLngZoom(latLng, 10)); }
public MarkLocationOnMap(GoogleMap mMap, string title, string snippet, LatLng pos) { var marker = new MarkerOptions(); marker.SetTitle(title); marker.SetSnippet(snippet); marker.Draggable(true); marker.SetPosition(pos); mMap.AddMarker(marker); }
private void GMap_MapClick(object sender, GoogleMap.MapClickEventArgs e) { Selected = new LocationHuntLocation(e.Point.Latitude, e.Point.Longitude, GMap.CameraPosition.Zoom, false); MarkerOptions opts = new MarkerOptions(); opts.SetPosition(new LatLng(Selected.Lat, Selected.Long)); GMap.Clear(); GMap.AddMarker(opts); }
private void AddMarker(int db, double lat, double lon, string info = "Keine Infos") { MarkerOptions opt = new MarkerOptions(); opt.SetPosition(new LatLng(lat, lon)); opt.SetTitle(db.ToString() + "db"); opt.SetSnippet(info); opt.InvokeIcon(GetIcon(GetColor(db))); _map.AddMarker(opt); }
/// <summary> /// Takes the current pin object and creates a GoogleMap marker /// from it. /// </summary> /// <returns>A MarkerOptions object from which to make a googlemap marker.</returns> public MarkerOptions CreateMarker() { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(this.Position.Latitude, this.Position.Longitude)); marker.SetTitle(this.Label); marker.SetSnippet(this.Address); marker.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.user_pin)); return(marker); }
/// <summary> /// Méthode héritée de IOnMapReadyCallback permettant de signaler à l'activité que la map est prête à être utilisée /// </summary> /// <see cref="IOnMapReadyCallback"/> /// <param name="map"></param> public void OnMapReady(GoogleMap map) { _map = map; MarkerOptions markerOpt1 = new MarkerOptions(); markerOpt1.SetPosition(new LatLng(Intent.GetDoubleExtra("latitude", -34), Intent.GetDoubleExtra("longitude", 151))); markerOpt1.SetTitle(Intent.GetStringExtra("eventName")); _map.AddMarker(markerOpt1); _map.MoveCamera(CameraUpdateFactory.NewLatLng(new LatLng(Intent.GetDoubleExtra("latitude", -34), Intent.GetDoubleExtra("longitude", 151)))); }
private MarkerOptions CreateMarkerOptions(Shop shop) { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(shop.Latitude, shop.Longitude)); marker.SetTitle(shop.Name); marker.SetSnippet(shop.Description); return(marker); }
protected override MarkerOptions CreateMarker(Pin pin) { //return base.CreateMarker(pin); var marker = new MarkerOptions(); marker.SetPosition(new LatLng(Pet.Latitude, Pet.Longitude)); marker.SetTitle(Pet.Name); marker.SetSnippet($"{Pet.Breed} - {Pet.Age} años"); return(marker); }
protected override MarkerOptions CreateMarker(Pin pin) { // return base.CreateMarker(pin); var marker = new MarkerOptions(); marker.SetPosition(new LatLng(Trip.Latitude, Trip.Longitude)); marker.SetTitle(Trip.Title); marker.SetSnippet(Trip.Notes); return(marker); }
/// <summary> /// Adds location markers on the map /// </summary> /// <param name="map">used map</param> /// <param name="list">list of places</param> public void AddLocationMarkers(GoogleMap map, ObservableCollection <SearchData.Result> list) { foreach (var item in list) { MarkerOptions markerOpt1 = new MarkerOptions(); markerOpt1.SetPosition(new LatLng(item.geometry.location.lat, item.geometry.location.lng)); markerOpt1.SetTitle(item.name); map.AddMarker(markerOpt1); } }
private void addIcon(IconGenerator iconFactory, string text, LatLng position) { MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetIcon(BitmapDescriptorFactory.FromBitmap(iconFactory.MakeIcon(text))); markerOptions.SetPosition(position); markerOptions.Anchor(iconFactory.AnchorU, iconFactory.AnchorV); getMap().AddMarker(markerOptions); }
protected override MarkerOptions CreateMarker(Pin pin) { //return base.CreateMarker(pin); var marker = new MarkerOptions(); marker.SetPosition(new LatLng(Order.Latitude, Order.Longitude)); marker.SetTitle(Order.Address); marker.SetSnippet(Order.Date.ToString()); return(marker); }
protected virtual MarkerOptions CreateMarker(Pin pin) { var opts = new MarkerOptions(); opts.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude)); opts.SetTitle(pin.Label); opts.SetSnippet(pin.Address); return(opts); }
public void MarkWithGPS() { Lat_Lng = new LatLng(_location.Latitude, _location.Longitude); mOptions.SetPosition(Lat_Lng); mOptions.SetTitle("Placed Marker"); gmap.AddMarker(mOptions); //CameraUpdate cu = CameraUpdateFactory.NewLatLngZoom(new LatLng(gmap.MyLocation.Latitude, gmap.MyLocation.Longitude), 14); // gmap.AnimateCamera(cu); }
protected override MarkerOptions CreateMarker(Pin pin) { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude)); marker.SetTitle(pin.Label); marker.SetSnippet(pin.Address); marker.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.pin)); return(marker); }
protected override MarkerOptions CreateMarker(Pin pin) { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude)); marker.SetTitle(pin.Label); marker.SetSnippet(pin.Address); return(marker); }
private void AddMarker(Map_Location newLoc) { MarkerOptions opts = new MarkerOptions(); opts.SetPosition(new LatLng(newLoc.Lat, newLoc.Long)); selectedMarkers.Add(GMap.AddMarker(opts)); UpdateText(); UpdateButton(); }
public void OnMapReady(GoogleMap googleMap) { MarkerOptions marker = new MarkerOptions(); marker.SetPosition(new LatLng(latitude, longitude)); marker.SetTitle("Your location"); googleMap.AddMarker(marker); googleMap.MoveCamera(CameraUpdateFactory.NewLatLngZoom(new LatLng(latitude, longitude), 10)); }
void MarkOnMap(string title, LatLng pos) { RunOnUiThread(() => { var marker = new MarkerOptions(); marker.SetTitle(title); marker.SetPosition(pos); map.AddMarker(marker); }); }
public void OnMapReady(GoogleMap googleMap) { MarkerOptions marker = new MarkerOptions(); marker.SetPosition(new LatLng(lat, lng)); marker.SetTitle("Pick up here"); googleMap.AddMarker(marker); googleMap.MoveCamera(CameraUpdateFactory.NewLatLngZoom(new LatLng(lat, lng), 12)); }
protected override MarkerOptions CreateMarker(Pin pin) { var marker = new MarkerOptions(); marker.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude)); marker.SetTitle(pin.Label); marker.SetSnippet(pin.Address); marker.SetIcon(GetCustomBitmapDescriptor("#8e24aa")); return(marker); }
private void googleMap_MapClick(object sender, GoogleMap.MapClickEventArgs e) { ((ExtMap)Element).OnTap(new Position(e.Point.Latitude, e.Point.Longitude)); var marker = new MarkerOptions(); _map.Clear(); marker.SetPosition(new LatLng(e.Point.Latitude, e.Point.Longitude)); marker.SetTitle("Selected Place"); _map.AddMarker(marker); }
public MarkerOptions BuildMarker(LatLng position) { Log.Debug("BuildMarker", "Building marker"); MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(position); return(markerOptions); }
protected override MarkerOptions CreateMarker(Pin pin) { //return base.CreateMarker(pin); var marker = new MarkerOptions(); marker.SetPosition(new LatLng(FuelStation.Latitude, FuelStation.Longitude)); marker.SetTitle(FuelStation.Name); marker.SetSnippet($"{FuelStation.Brand}"); return(marker); }
public async Task SetupMapIfNeeded() { //if (_map == null) //{ if (_map != null) { var criteria = new Criteria { PowerRequirement = Power.Medium }; var bestProvider = locationManager.GetBestProvider(criteria, true); var location = locationManager.GetLastKnownLocation(bestProvider); System.Diagnostics.Debug.WriteLine("start timer maps loc " + location.Latitude); MarkerOptions markerOpt1 = new MarkerOptions(); VimyRidge = new LatLng(location.Latitude, location.Longitude); markerOpt1 = new MarkerOptions(); markerOpt1.SetPosition(VimyRidge); markerOpt1.SetTitle("Mi ubicación"); markerOpt1.InvokeIcon(BitmapDescriptorFactory.DefaultMarker(BitmapDescriptorFactory.HueCyan)); _map.AddMarker(markerOpt1); List <Coord> requestCoord = await App.Database.GetAllCoordAsync(); foreach (Coord item in requestCoord) { System.Diagnostics.Debug.WriteLine("entra maps marker"); Passchendaele = new LatLng(Double.Parse(item.LATITUD), Double.Parse(item.LONGITUD)); markerOpt1 = new MarkerOptions(); markerOpt1.SetPosition(Passchendaele); markerOpt1.SetTitle(item.CMADDRESS); //markerOpt1.InvokeIcon(BitmapDescriptorFactory.DefaultMarker(BitmapDescriptorFactory.HueCyan)); _map.AddMarker(markerOpt1); //MarkerOptions markerOpt2 = new MarkerOptions(); //markerOpt2.SetPosition(Passchendaele); //markerOpt2.SetTitle("Passchendaele"); //_map.AddMarker(markerOpt2); } // We create an instance of CameraUpdate, and move the map to it. 15 //actualizacion de la posicion de la camara if (ind == 0) { CameraUpdate cameraUpdate = CameraUpdateFactory.NewLatLngZoom(VimyRidge, 10); _map.MoveCamera(cameraUpdate); ind = 1; } } //} }