Doubt to access latitude and logintude

549
4
Jump to solution
12-17-2023 09:06 PM
Manoj081498
New Contributor

Hi Everyone

I am new to unity and working on ArcGIS Map SDK 

As we know that in ArcGIS camera Gameobject we have ArcGIS Location which has longitude and latitude.

how we can access those into my game window.

Thank You,

Manoj

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
and1
by Esri Contributor
Esri Contributor

If you just want to display the current ArcGIS Camera position in terms of long and lat, you could check the ArcGIS Location Component that is attached to the ArcGIS Camera gameobject. 

SCR-20231220-jpmw.png

You could also get it displayed in the game window by passing those info to 2D UI texts. You should be able to get the lat and long values by requesting the position. (check ArcGISLocationComponent.cs in Assets/ArcGISMapsSDK/SDK/Components/). It will give you the X, Y, and Z values of the ArcGIS Point, depending on the spatial reference.

 

View solution in original post

0 Kudos
4 Replies
and1
by Esri Contributor
Esri Contributor

Hi, you can reference the ArcGISCamera API for accessing those.

0 Kudos
Manoj081498
New Contributor

Can you explain it little bit more.?

0 Kudos
and1
by Esri Contributor
Esri Contributor

If you just want to display the current ArcGIS Camera position in terms of long and lat, you could check the ArcGIS Location Component that is attached to the ArcGIS Camera gameobject. 

SCR-20231220-jpmw.png

You could also get it displayed in the game window by passing those info to 2D UI texts. You should be able to get the lat and long values by requesting the position. (check ArcGISLocationComponent.cs in Assets/ArcGISMapsSDK/SDK/Components/). It will give you the X, Y, and Z values of the ArcGIS Point, depending on the spatial reference.

 

0 Kudos
Manoj081498
New Contributor

I got it, Thank you

But the 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

0 Kudos