# Creating variables for Latitude and Longitude Georeferenced Cesium

**URL:** <https://community.cesium.com/t/creating-variables-for-latitude-and-longitude-georeferenced-cesium/32039>\
**Category:** Cesium for Unreal\
**Created:** [May 9, 2024, 2:47pm UTC](https://community.cesium.com/t/creating-variables-for-latitude-and-longitude-georeferenced-cesium/32039 "2024-05-09T14:47:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidHardenatUbihere](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/davidhardenatubihere/32/14037_2.png) [@DavidHardenatUbihere](https://community.cesium.com/u/DavidHardenatUbihere)\
**Post date:** [May 9, 2024, 2:47pm UTC](https://community.cesium.com/t/creating-variables-for-latitude-and-longitude-georeferenced-cesium/32039/1 "2024-05-09T14:47:41Z")

</div>

I was wondering how to create two variables for the Latitude and Longitude so I can call on it as I move around to get the two at the same time and understand where I am in runtime. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [May 9, 2024, 10:51pm UTC](https://community.cesium.com/t/creating-variables-for-latitude-and-longitude-georeferenced-cesium/32039/2 "2024-05-09T22:51:02Z")

</div>

Hi @DavidHardenatUbihere,

If you add a CesiumGlobeAnchor component to your Actor, it has Longitude, Latitude, and Height properties that are accessible from Blueprints. Or you can use the GetLongitude, GetLatitude, and GetHeight methods from C++.

If you can’t use a globe anchor for some reason, then the CesiumGeoreference has a function `TransformUnrealPositionToLongitudeLatitudeHeight` that will give you the longitude/latitude/height for any given Unreal world position (note that Longitude is in the X position!). This function is callable from both Blueprints and C++.
