Hi Everyone
I am new to unity I have a doubt
ArcGIS Location is the location of camera. Is there any way to get the location of cursor where we point mouse pointer in the map
Since you are new to Unity, I would check out the Camera.ScreenToWorldPoint (https://docs.unity3d.com/ScriptReference/Camera.ScreenToWorldPoint.html) method to learn more about how Unity translates the x/y screen point(2D) into a world point(3D).
Once you understand that, you can get the lat/long location of the map as follows:
In a script that is attached to the Map GameObject, you will need to cast a ray from the camera at the touch position. touchPos is a Vector3 point where the screen is touched
Ray ray = Camera.main.ScreenPointToRay(touchPos);
RaycastHit[] hits = UnityEngine.Physics.RaycastAll(ray);
In the hits array, one of the hits will be a hit on the map. Using the point property of the hit you can get the lat/lng as follows:
ArcGISMapComponent mapComponent = gameObject.GetComponentInParent<ArcGISMapComponent>();
ArcGISPoint coords = mapComponent.EngineToGeographic(h.point);
Review the ArcGISPoint API reference here:
https://developers.arcgis.com/unity/api-reference/gameengine/geometry/arcgispoint/
I have tried what you said but it is not working.
can you assist further