예제 #1
0
        private void OnSelect(int index)
        {
            Location       location = LocationDatabase.GetLocationFromSearch(index);
            LocationMarker marker   = new LocationMarker(location);

            if (marker == null)
            {
                return;
            }

            SetMarker(marker, currentContext);
        }
예제 #2
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);
            }
        }
예제 #3
0
        private void SetMarker(LocationMarker marker, Context context)
        {
            string displayedName = (marker != null ? marker.displayedName : "");

            if (context == Context.SetDestination)
            {
                destinationMarker = marker;
                destinationMarkerButton.SetDisplayedText(displayedName, false);
            }
            else
            {
                originMarker = marker;
                originMarkerButton.SetDisplayedText(displayedName, false);
            }

            Navigate();
            CloseContext();
        }
예제 #4
0
 private void SetMarker(LocationMarker marker)
 {
     SetMarker(marker, currentContext);
 }