-
Notifications
You must be signed in to change notification settings - Fork 59
Feature: Identify Sample #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Release/2.2
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File should be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File should be renamed.
|
|
||
| private void Start() | ||
| { | ||
| if (arcGISMapComponent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to early return if we don't have a map component?
| var arcGISRaycastHit = arcGISMapComponent.GetArcGISRaycastHit(hit); | ||
| var geoPosition = arcGISMapComponent.EngineToGeographic(hit.point); | ||
| var cameraGeoPosition = arcGISMapComponent.EngineToGeographic(Camera.main.transform.position); | ||
| var result = arcGISMapComponent.View.IdentifyLayersAsync(geoPosition, cameraGeoPosition, -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name needs to be changed to represent multiple results.
| Shader.SetGlobalColor("_HighlightColor", selectColor); | ||
| } | ||
|
|
||
| public void StartRaycast() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this will need to be refactored to support the Android & Linux coroutine workflow.
| [SerializeField] private Button increaseResult; | ||
| [SerializeField] private Button decreaseResult; | ||
|
|
||
| private ArcGISImmutableCollection<ArcGISIdentifyLayerResult> resultValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name needs to be changed to indicate that it is multiple results.
| [SerializeField] private Button decreaseResult; | ||
|
|
||
| private ArcGISImmutableCollection<ArcGISIdentifyLayerResult> resultValue; | ||
| public ulong resultsLength; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this needs to be public?
| { | ||
| var id = attributes["OBJECTID"]; | ||
| selectedID = Convert.ToInt32(id.ToString()); | ||
| Shader.SetGlobalFloat("_SelectedObjectID", selectedID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest adding a comment explaining this. There is no indication to the user that this is the part of the code making the shader "selection" happen.
| @@ -0,0 +1,30 @@ | |||
| using TMPro; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs copyright statement.
| EmptyBuildingListResults(); | ||
| SelectedResult = 0; | ||
| var arcGISRaycastHit = arcGISMapComponent.GetArcGISRaycastHit(hit); | ||
| var geoPosition = arcGISMapComponent.EngineToGeographic(hit.point); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| var geoPosition = arcGISMapComponent.EngineToGeographic(hit.point); | |
| var hitPosition = arcGISMapComponent.EngineToGeographic(hit.point); |
Sample
Identify Sample in all its glory
Checklist
keyword: Short description of changeArcGIS Maps SDK Version
Daily Build from 11/6/25 & Unity 2022.3 LTS