private void FocusToSelectedLocation()
 {
     if (selectedLocation != null)
     {
         float zoom = (selectedLocation is Place ? 0.5f : 0.75f);
         NavigationCamera.FocusTo(selectedLocation.position, zoom);
     }
 }
예제 #2
0
        public NavigationCameraTests()
        {
            _requestBuilderMock = new Mock <IRequestBuilder>();

            _requestBuilderMock
            .Setup(m => m.AddQueryParameter("camera", It.IsAny <string>()))
            .Returns(_requestBuilderMock.Object);

            _camera = new NavigationCamera(_requestBuilderMock.Object);
        }
예제 #3
0
        private void MarkByCursor()
        {
            if (cursor == null)
            {
                return;
            }

            Rect           cursorRect = RectTransformToScreenSpace(cursor);
            Vector3        position   = NavigationCamera.GetPosition(cursorRect.position);
            LocationMarker marker     = new LocationMarker("Custom Marker", position);

            if (OnMark != null)
            {
                OnMark(marker);
            }
        }