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

            if (marker == null)
            {
                return;
            }

            SetMarker(marker, currentContext);
        }
Esempio n. 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);
            }
        }
Esempio n. 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();
        }
Esempio n. 4
0
 private void SetMarker(LocationMarker marker)
 {
     SetMarker(marker, currentContext);
 }