# Setup a linerender with longitude/latitude value

**URL:** <https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716>\
**Category:** Cesium for Unity\
**Created:** [July 29, 2023, 12:40pm UTC](https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716 "2023-07-29T12:40:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chouchen](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chouchen/32/14000_2.png) [@chouchen](https://community.cesium.com/u/chouchen)\
**Post date:** [July 29, 2023, 12:40pm UTC](https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716/1 "2023-07-29T12:40:58Z")

</div>

Hello,

I want to draw a path inside a cesium world, and use a LineRenderer for that. In entry I have a bunch of world position (longitude/latitude). I can’t use CesiumGlobeAnchor for this. Is there a function I can use to get unity position, from CesiumGeoreference maybe ? TransformEarthCenteredEarthFixedPositionToUnity doesn’t seem to return what I want.

Thanks,

---

<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:** [July 30, 2023, 10:26pm UTC](https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716/2 "2023-07-30T22:26:19Z")

</div>

`TransformEarthCenteredEarthFixedPositionToUnity` is what you want, but if you’re starting with Longitude/Latitude/Height you’ll need to transform it to ECEF first by using `CesiumWgs84Ellipsoid.LongitudeLatitudeHeightToEarthCenteredEarthFixed`. Don’t forget that X is longitude, not latitude.

---

<div class="post-metadata">

**Author:** ![chouchen](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chouchen/32/14000_2.png) [@chouchen](https://community.cesium.com/u/chouchen)\
**Post date:** [August 2, 2023, 8:43pm UTC](https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716/3 "2023-08-02T20:43:42Z")

</div>

Thanks it’s work! Is it normal that I have to convert this positions each frame? At least with the CesiumCameraControler. Still have some issue with height, but I think I need to figure how to use “elevation” data.

---

<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:** [August 2, 2023, 10:08pm UTC](https://community.cesium.com/t/setup-a-linerender-with-longitude-latitude-value/25716/4 "2023-08-02T22:08:53Z")

</div>

You may be able to avoid the need to update the positions each frame by adding a CesiumGlobeAnchor component to your GameObject. It’s caused by origin shifting, which is a behavior caused by the CesiumOriginShift component which is found on the DynamicCamera by default.
