private void OnSelect(int index) { Location location = LocationDatabase.GetLocationFromSearch(index); LocationMarker marker = new LocationMarker(location); if (marker == null) { return; } SetMarker(marker, currentContext); }
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); } }
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(); }
private void SetMarker(LocationMarker marker) { SetMarker(marker, currentContext); }