public void OnMapReady(GoogleMap googleMap) { OnibusClass AcompanhaOnibus = new OnibusClass(); DataRow Onibus; string PosX, PosY; Double ValX, ValY; Onibus = AcompanhaOnibus.SelectOnibus(Convert.ToInt32(NumeroOnibus)).Rows[0]; PosX = Onibus.ItemArray[2].ToString(); PosY = Onibus.ItemArray[3].ToString(); ValX = Convert.ToDouble(PosX); ValY = Convert.ToDouble(PosY); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; new PontosClass().CarregaPontosMapa(googleMap); googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); if (_currentLocation == null) { Gps(); _currentLocation = _locationManager.GetLastKnownLocation(_ProviderGps); } googleMap.MoveCamera(CameraUpdateFactory.NewCameraPosition(new CameraPosition(new LatLng(_currentLocation.Latitude, ValY), 35, 0, 0))); OnibusMark = googleMap.AddMarker(new MarkerOptions().SetPosition(new LatLng(ValX, _currentLocation.Longitude)) .SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.bus))); Mapp = googleMap; }
public void OnMapReady(GoogleMap googleMap) { LatLng belmont = new LatLng(-31.9798264, 115.7799933); CameraUpdate camera = CameraUpdateFactory.NewLatLngZoom(belmont, 15); MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(new LatLng(-31.9798264, 115.7799933)); markerOptions.SetTitle("Claremont Trails"); markerOptions.SetSnippet("Start Here"); googleMap.AddMarker(markerOptions); MarkerOptions markerOptions2 = new MarkerOptions(); markerOptions2.SetPosition(new LatLng(-31.980699, 115.7813756)); markerOptions2.SetTitle("Claremont Trails Finish"); markerOptions2.SetSnippet("End Here"); googleMap.AddMarker(markerOptions2); //Optional fluff googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); googleMap.UiSettings.ZoomGesturesEnabled = false; }
public void OnMapReady(GoogleMap googleMap) { map = googleMap; googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
// ######## - Metodos IOnMapReadyCallback public void OnMapReady(GoogleMap googleMap) { //CriaPontos(googleMap); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; new PontosClass().CarregaPontosMapa(googleMap); googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap mMap) { googleMap = mMap; AddMarkers(googleMap, HomeFragment.instance.MarkersViewModelInstance().Markers); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
void SetupZoomInButton() { Button zoomInButton = FindViewById <Button>(Resource.Id.zoomInButton); zoomInButton.Click += (sender, e) => { _map.AnimateCamera(CameraUpdateFactory.ZoomIn()); }; }
public void OnZoomIn(View view) { if (!CheckReady()) { return; } ChangeCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap googleMap) { map = googleMap; //Optional googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); googleMap.UiSettings.MyLocationButtonEnabled = true; }
public async void OnMapReady(GoogleMap googleMap) { try { var latLng = await GetLocationFromAddress(EventData.Location); if (latLng != null) { CurrentLatitude = latLng.Latitude; CurrentLongitude = latLng.Longitude; } Map = googleMap; //Optional googleMap.UiSettings.ZoomControlsEnabled = false; googleMap.UiSettings.CompassEnabled = false; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); var makerOptions = new MarkerOptions(); makerOptions.SetPosition(new LatLng(CurrentLatitude, CurrentLongitude)); makerOptions.SetTitle(GetText(Resource.String.Lbl_EventPlace)); Map.AddMarker(makerOptions); Map.MapType = GoogleMap.MapTypeNormal; switch (AppSettings.SetTabDarkTheme) { case true: { MapStyleOptions style = MapStyleOptions.LoadRawResourceStyle(this, Resource.Raw.map_dark); Map.SetMapStyle(style); break; } } CameraPosition.Builder builder = CameraPosition.InvokeBuilder(); builder.Target(new LatLng(CurrentLatitude, CurrentLongitude)); builder.Zoom(10); builder.Bearing(155); builder.Tilt(65); CameraPosition cameraPosition = builder.Build(); CameraUpdate cameraUpdate = CameraUpdateFactory.NewCameraPosition(cameraPosition); googleMap.MoveCamera(cameraUpdate); Map.MapClick += MapOnMapClick; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
public void OnMapReady(GoogleMap googleMap) { MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(new LatLng(16.03, 108)); googleMap.AddMarker(markerOptions); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap googleMap) { MarkerOptions oMarkerOptions = new MarkerOptions(); oMarkerOptions.SetPosition(new LatLng(4.7396702, -74.098686)); oMarkerOptions.SetTitle("I'm Here Javier"); googleMap.AddMarker(oMarkerOptions); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap googleMap) { MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(new LatLng(59.334591, 18.063240)); markerOptions.SetTitle("Moderstaden"); googleMap.AddMarker(markerOptions); googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.MyLocationButtonEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap googleMap) { //Opties voor kaart googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); googleMap.MyLocationEnabled = true; this.googleMap = googleMap; double lat = 1000000; lat = lat / 100000; setMarker(lat, 10.0);//, googleMap); }
public void OnMapReady(GoogleMap googleMap) { map = googleMap; MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(new LatLng(16.03, 108)); markerOptions.SetTitle("My position"); googleMap.AddMarker(markerOptions); //Optional googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); //LongClick on Map map.SetOnMapLongClickListener(this); }
public void OnMapReady(GoogleMap googleMap) { try { Map = googleMap; //Optional googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); } catch (Exception e) { Crashes.TrackError(e); } }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); var element = Element as MapWithMyZoomControl; if (e.PropertyName == "MyZoom" && map != null) { if (element.MyZoom == MapWithMyZoomControl.ZoomState.zoomin) { map.AnimateCamera(CameraUpdateFactory.ZoomIn()); } else if (element.MyZoom == MapWithMyZoomControl.ZoomState.zoomout) { map.AnimateCamera(CameraUpdateFactory.ZoomOut()); } element.MyZoom = MapWithMyZoomControl.ZoomState.normal; } }
public void OnMapReady(GoogleMap googleMap) { _map = googleMap; MarkerOptions markerOptions = new MarkerOptions(); markerOptions.SetPosition(new LatLng(16.03, 108)); markerOptions.SetTitle("test"); markerOptions.Draggable(true); markerOptions.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.ic_location_on_green_light_36dp)); _map.AddMarker(markerOptions); //zoom _map.UiSettings.ZoomControlsEnabled = true; _map.UiSettings.CompassEnabled = true; _map.MoveCamera(CameraUpdateFactory.ZoomIn()); if (_map != null) { _map.MapType = GoogleMap.MapTypeNormal; } }
public async void OnMapReady(GoogleMap googleMap) { try { var loction = await API_Request.GetNameLocation(_Event_Data.location); if (loction.Count > 0) { CurrentLatitude = loction[0].geometry.location.lat; CurrentLongitude = loction[0].geometry.location.lng; } Map = googleMap; //Optional googleMap.UiSettings.MapToolbarEnabled = true; googleMap.UiSettings.ZoomControlsEnabled = false; googleMap.UiSettings.CompassEnabled = false; googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); var makerOptions = new MarkerOptions(); makerOptions.SetPosition(new LatLng(CurrentLatitude, CurrentLongitude)); makerOptions.SetTitle(GetText(Resource.String.Lbl_EventPlace)); Map.AddMarker(makerOptions); Map.SetOnInfoWindowClickListener(this); // Add event click on marker icon Map.MapType = GoogleMap.MapTypeNormal; var builder = CameraPosition.InvokeBuilder(); builder.Target(new LatLng(CurrentLatitude, CurrentLongitude)); var cameraPosition = builder.Zoom(16).Target(new LatLng(CurrentLatitude, CurrentLongitude)).Build(); cameraPosition.Zoom = 16; var cameraUpdate = CameraUpdateFactory.NewCameraPosition(cameraPosition); Map.MoveCamera(cameraUpdate); } catch (Exception e) { Crashes.TrackError(e); } }
public void OnMapReady(GoogleMap googleMap) { gMap = googleMap; gMap.MapType = GoogleMap.MapTypeNormal; gMap.SetOnMarkerClickListener(this); gMap.UiSettings.ZoomControlsEnabled = true; gMap.UiSettings.MyLocationButtonEnabled = true; gMap.UiSettings.MapToolbarEnabled = true; gMap.UiSettings.CompassEnabled = true; gMap.UiSettings.ScrollGesturesEnabled = true; gMap.UiSettings.ZoomGesturesEnabled = true; gMap.MoveCamera(CameraUpdateFactory.ZoomIn()); gMap.AddMarker(new MarkerOptions().SetPosition(nightClub)); //.SetIcon(BitmapDescriptorFactory.FromBitmap(GetCustomLocationMarkerView(Resource.Drawable.map_nightClub)))); //Bar gMap.AddMarker(new MarkerOptions().SetPosition(bar)); //.SetIcon(BitmapDescriptorFactory.FromBitmap(GetCustomLocationMarkerView(Resource.Drawable.map_barIcon)))); //Sports bar gMap.AddMarker(new MarkerOptions().SetPosition(sportsBar)); //.SetIcon(BitmapDescriptorFactory.FromBitmap(GetCustomLocationMarkerView(Resource.Drawable.map_sportsBar)))); //restuarant gMap.AddMarker(new MarkerOptions().SetPosition(restaurant)); //.SetIcon(BitmapDescriptorFactory.FromBitmap(GetCustomLocationMarkerView(Resource.Drawable.map_restaurant)))); gMap.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(nightClub, 18)); if (currentLocationLatLng != null) { isCurrentLocationZoomedIn = true; ZoomIntoCurrentLocation(); } else { Console.WriteLine("OnMapReady : current location latLng not fetched"); } }
private void BtnInOut_Click(object sender, EventArgs e) { this.Map.MoveCamera(CameraUpdateFactory.ZoomIn()); }
public void OnMapReady(GoogleMap googleMap) { try { Map = googleMap; var makerOptions = new MarkerOptions(); makerOptions.SetPosition(new LatLng(Lat, Lng)); makerOptions.SetTitle(GetText(Resource.String.Lbl_Location)); Map.AddMarker(makerOptions); Map.MapType = GoogleMap.MapTypeNormal; if (AppSettings.SetTabDarkTheme) { MapStyleOptions style = MapStyleOptions.LoadRawResourceStyle(this, Resource.Raw.map_dark); Map.SetMapStyle(style); } //Optional googleMap.UiSettings.ZoomControlsEnabled = true; googleMap.UiSettings.CompassEnabled = true; OnLocationChanged(); googleMap.MoveCamera(CameraUpdateFactory.ZoomIn()); LatLng location = new LatLng(Lat, Lng); CameraPosition.Builder builder = CameraPosition.InvokeBuilder(); builder.Target(location); builder.Zoom(18); builder.Bearing(155); builder.Tilt(65); CameraPosition cameraPosition = builder.Build(); CameraUpdate cameraUpdate = CameraUpdateFactory.NewCameraPosition(cameraPosition); googleMap.MoveCamera(cameraUpdate); googleMap.MapClick += async(sender, e) => { try { LatLng latLng = e.Point; var tapTextView = "Tapped: Point=" + e.Point; Console.WriteLine(tapTextView); Lat = latLng.Latitude; Lng = latLng.Longitude; // Creating a marker MarkerOptions markerOptions = new MarkerOptions(); // Setting the position for the marker markerOptions.SetPosition(e.Point); var addresses = await ReverseGeocodeCurrentLocation(latLng); if (addresses != null) { DeviceAddress = addresses.GetAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex() //string city = addresses.Locality; //string state = addresses.AdminArea; //string country = addresses.CountryName; //string postalCode = addresses.PostalCode; //string knownName = addresses.FeatureName; // Only if available else return NULL // Setting the title for the marker. // This will be displayed on taping the marker markerOptions.SetTitle(DeviceAddress); } // Clears the previously touched position googleMap.Clear(); // Animating to the touched position googleMap.AnimateCamera(CameraUpdateFactory.NewLatLng(e.Point)); // Placing a marker on the touched position googleMap.AddMarker(markerOptions); } catch (Exception exception) { Console.WriteLine(exception); } }; googleMap.MapLongClick += (sender, e) => { try { var tapTextView = "Long Pressed: Point=" + e.Point; Console.WriteLine(tapTextView); } catch (Exception exception) { Console.WriteLine(exception); } }; googleMap.CameraChange += (sender, e) => { try { var cameraTextView = e.Position.ToString(); Console.WriteLine(cameraTextView); } catch (Exception exception) { Console.WriteLine(exception); } }; } catch (Exception e) { Console.WriteLine(e); } }