public void OnStreetViewPanoramaReady (StreetViewPanorama panorama) { mStreetViewPanorama = panorama; mStreetViewPanorama.SetPosition (markerPosition); mStreetViewPanorama.StreetViewPanoramaChange += (sender, e) => { if (e.Location != null) mMarker.Position = e.Location.Position; }; }
public void OnStreetViewPanoramaReady(StreetViewPanorama panorama) { streetPanorama = panorama; streetPanorama.UserNavigationEnabled = true; streetPanorama.StreetNamesEnabled = true; streetPanorama.PanningGesturesEnabled = true; streetPanorama.ZoomGesturesEnabled = true; streetPanorama.SetPosition (latlng); }
public void OnStreetViewPanoramaReady(StreetViewPanorama panorama) { streetPanorama = panorama; streetPanorama.UserNavigationEnabled = true; streetPanorama.StreetNamesEnabled = true; streetPanorama.PanningGesturesEnabled = true; streetPanorama.ZoomGesturesEnabled = true; streetPanorama.SetPosition(latlng); }
public void OnStreetViewPanoramaReady(StreetViewPanorama panorama) { mStreetViewPanorama = panorama; mStreetViewPanorama.SetPosition(markerPosition); mStreetViewPanorama.StreetViewPanoramaChange += (sender, e) => { if (e.Location != null) { mMarker.Position = e.Location.Position; } }; }
public void OnMapReady(GoogleMap googleMap) { googleMap.MarkerDragEnd += (sender, e) => { mStreetViewPanorama.SetPosition(e.Marker.Position, 150); }; // Creates a draggable marker. Long press to drag. mMarker = googleMap.AddMarker(new MarkerOptions() .SetPosition(markerPosition) .SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.pegman)) .Draggable(true)); }
public void OpenStationWithMarker(Marker marker) { if (string.IsNullOrEmpty(marker.Title) || marker.Title == SearchPinId) { return; } var splitTitle = marker.Title.Split('|'); string displayNameSecond; var displayName = StationUtils.CutStationName(splitTitle [1], out displayNameSecond); ipName.Text = displayName; ipName2.Text = displayNameSecond; currentShownID = int.Parse(splitTitle [0]); currentShownMarker = marker; var isLocked = string.IsNullOrEmpty(marker.Snippet); if (ipStationLock == null) { ipStationLock = pane.FindViewById(Resource.Id.stationLock); } ipStationLock.Visibility = isLocked ? ViewStates.Visible : ViewStates.Gone; if (!isLocked) { var splitNumbers = marker.Snippet.Split('|'); ipBikes.Text = splitNumbers [0]; ipSlots.Text = splitNumbers [1]; var baseGreen = Color.Rgb(0x66, 0x99, 0x00); var baseRed = Color.Rgb(0xcc, 0x00, 0x00); var bikesNum = int.Parse(splitNumbers [0]); var slotsNum = int.Parse(splitNumbers [1]); var total = bikesNum + slotsNum; var distance = GeoUtils.Distance( new GeoPoint { Lat = marker.Position.Latitude, Lon = marker.Position.Longitude }, new GeoPoint { Lat = map.MyLocation.Latitude, Lon = map.MyLocation.Longitude } ) * 1000; var bikesColor = PinFactory.InterpolateColor(baseRed, baseGreen, ((float)bikesNum) / total); var slotsColor = PinFactory.InterpolateColor(baseRed, baseGreen, ((float)slotsNum) / total); ipBikes.SetTextColor(bikesColor); ipSlots.SetTextColor(slotsColor); DrawableCompat.SetTint(bikeDrawable, bikesColor.ToArgb()); DrawableCompat.SetTint(rackDrawable, slotsColor.ToArgb()); ipDistance.Text = GeoUtils.GetDisplayDistance(distance) + " " + GeoUtils.GetUnitForDistance(distance); ipDistance.Visibility = ViewStates.Visible; ipBikes.Visibility = ViewStates.Visible; ipSlots.Visibility = ViewStates.Visible; ipBikesImg.Visibility = ViewStates.Visible; ipSlotsImg.Visibility = ViewStates.Visible; } else { ipDistance.Visibility = ViewStates.Gone; ipBikes.Visibility = ViewStates.Invisible; ipSlots.Visibility = ViewStates.Invisible; ipBikesImg.Visibility = ViewStates.Invisible; ipSlotsImg.Visibility = ViewStates.Invisible; } var favs = favManager.LastFavorites ?? favManager.GetFavoriteStationIds(); bool activated = favs.Contains(currentShownID); fab.Checked = activated; fab.JumpDrawablesToCurrentState(); if (streetPanorama != null) { streetPanorama.SetPosition(marker.Position); } LoadStationHistory(currentShownID); pane.SetState(InfoPane.State.Opened); }