Пример #1
0
        public void OnTiltLess (View view) 
        {
            if (!CheckReady ())
                return;

            var currentCameraPosition = map.CameraPosition;
            var currentTilt = currentCameraPosition.Tilt;
            var newTilt = currentTilt - 10;
            newTilt = (newTilt > 0) ? newTilt : 0;

            var cameraPosition = new CameraPosition.Builder (currentCameraPosition)
                .Tilt (newTilt).Build ();

            ChangeCamera (CameraUpdateFactory.NewCameraPosition (cameraPosition));
        }
Пример #2
0
        public bool OnMarkerClick(Marker marker)
        {
            if(marker.Equals(currentLocationMarker))
                {

                if (_markerClick) {

                    CameraPosition pos = new CameraPosition.Builder ().Target (coord).Zoom (17).Tilt (90).Build ();

                    map.AnimateCamera (CameraUpdateFactory.NewCameraPosition (pos));
                }
                else
                {
                    CameraPosition pos = new CameraPosition.Builder ().Target (coord).Zoom (17).Build ();

                    map.AnimateCamera (CameraUpdateFactory.NewCameraPosition (pos));
                    //CameraUpdate update = CameraUpdateFactory.NewLatLngZoom(coord, 17);

                    //map.AnimateCamera(update);
                }

                }
            _markerClick = !_markerClick;
            return true;
        }
		void RotateCamera(float bearing)
		{
			// Get old position of map
			CameraPosition oldPos = _map.CameraPosition;
			// Calculate new orientation
			CameraPosition pos = new CameraPosition.Builder(oldPos).Bearing(bearing).Build();
			// Set new orientation
			_map.MoveCamera(CameraUpdateFactory.NewCameraPosition(pos));
		}