# Position offset in 2d and 3d view

**URL:** <https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191>\
**Category:** CesiumJS\
**Created:** [April 14, 2019, 1:24am UTC](https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191 "2019-04-14T01:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wguor](https://avatars.discourse-cdn.com/v4/letter/w/5daacb/32.png) [@wguor](https://community.cesium.com/u/wguor)\
**Post date:** [April 14, 2019, 1:24am UTC](https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191/1 "2019-04-14T01:24:56Z")

</div>

I have A retangle with a radar image as its materia on cesium ,  
But when i swith between 2d and 3d ,the position of the same image on map is a little diferrent ! I tested it with singletileimageprovider ,it did not has this problem . Does. Any one konw what up?

[MOV\_20190414\_0919198.mp4](https://community.cesium.com/uploads/short-url/590MYKIaT3qavwXuuaRHk9hle0h.mp4) (2.24 MB)

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [April 18, 2019, 5:55pm UTC](https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191/2 "2019-04-18T17:55:26Z")

</div>

I wonder if this has anything to do with what projection or tiling scheme the imagery uses. It’s a little hard to tell from the video because it looks like the 2D view is zoomed in a bit more than the 3D view?

Are you able to share a Sandcastle example ([https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/)) of this so I can run it?

---

<div class="post-metadata">

**Author:** ![wguor](https://avatars.discourse-cdn.com/v4/letter/w/5daacb/32.png) [@wguor](https://community.cesium.com/u/wguor)\
**Post date:** [April 26, 2019, 5:54pm UTC](https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191/3 "2019-04-26T17:54:14Z")

</div>

Very thank you sir,  
What i want is past a weather radar image to a rectangle , and this image should be clamp to terrain . But when the terrain layer is added , there should be no "height" attribution for the retangle, then i found the radar image has a small position shift in the 2d and 3d views.

If i turn off the terrain layer and set height equal to zero for thr rectangle, then it is ok .

Here is my test, please help me to fix this problem , thank you very mush!

> **[Cesium Sandcastle](https://sandcastle.cesium.com/?)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [April 29, 2019, 4:12pm UTC](https://community.cesium.com/t/position-offset-in-2d-and-3d-view/8191/4 "2019-04-29T16:12:24Z")

</div>

Thanks for posting this Sandcastle. I think it’s definitely easy to see that there’s a discrepancy when setting up the 2D and 3D viewer [side by side like in this Sandcastle](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=7Vf7b9s2EP5XiBRFFcCTbOXRxkmKpU7WBkjXoDZqbDCQ0NLZ4kKTAknbcYv87zs+JMuu12Er0P0yA4nN1/Huu+8eTBIyBLKkwhA5V8QsJVkwWGpiJBkD0SuRQU5opqTGOTaDFtGSLIFkCqiBkUgSQokuqMJtGZfZA5HjPyAzxBTUkLE0RRDo9ozEgiq/7xPOvpc5cHJOBCxJDzSbz+Lexlq0f+qPyNIwKfTBJe7+MhIEP5M55xrVAPFmbowUpEsmlGto+WWdgQAr5JZlD6C2VrdU6G5NhF0GlKJM3Cq5YDmobqWkN34oFc8Hfku0PxJPm7qmDV0LOYOdWv4AI5iYyDfycevsFGSGm9RfXUhqY/vVVNzvXf16lV6GrYIu2JRaU98BL3eqTwWbuR3V/BokTk0H8Tk4qocpDg8PwlAKu9rptOuxXe6kR1awY92w4mBNWlC6hWRE3KlAzhIkixSeooMCSK/fJwx5CIbMS8vvktMMTxcwIxrdS8Yr9+1vtAId2xrc/OQuiV74tRetNSsdTd1s7BCMp1yOIc6hNMUAtLmYIke0CWRBqUbNYX0GhGGGgY5pnkeBMizvjvYUzamaSU1ZNtoLoCqMLi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3u/COAYxaZTDCCMKNHkY0F1UCS3LehR+7lvWSVWmwcgzJCZxBDUICxCC3yB2ecXFWSsrP9yubTiXGfrdzCz2rYIa5INX6xBvXDTuQWzcxrg6zPhW+GaMBPJkQC6Qs3OuYsRfTrm6GWxcieDETO5gJk1VW7wru4NvN990uiX2Hf33LmeZy4Hhd2DlftRGtvSn/vnwuk/Pj9QVGj+XSJ+R9J+hwKMm39/+saG/Pr0XmvvTJsVh9c+iH5ms1IqfL8oHsVxYmBWWlt1Mp7j89DEmdZVVnmWuRCyN2BGR9rV2R49iKdW+CLj8HhazS5t4euSTrv9vJ4LrVRzMqTiZ+F59LVQJmz6+GlsX6LfEN6Uk36fnLOkgugsZwvsOM9He1vGj/bwaUy1xhX74O6zzzDaC5iuD3mbcOEswbmdy2lzuf6ut3BJsc+c2r4bjbBbi87rGz8Zx/FZgsOvTxkp+ZiqhuQ/AQ).

It seems that this discrepancy is there regardless of whether the terrain is there or not. It’s just whether it’s clamped to the ground or not. I wonder if this is because the underlying primitive is different when clamping a rectangle to ground (it uses GroundPrimitive vs Primitive).

In this Sandcastle I just posted, is it the 2D view that is in the correct position, or the 3D view?
