Camera move X pixels

Hello i would like to Flyto a position - this works fine, the position is in the center of the map
And now i would like to pan the map in such a way that the position, which was in the center now moves to the PIXEL position 500, 50.

I found i can move them camera with moveLeft and so anmount meters, but i dno’t know how i can calc how much meter 500 pixels are?

anybody can help?


You can convert the pixel coordinate to a coordinate in world space using picking. You can get the globe position using var cartesian = Cesium.Cartesian2(500, 50)), scene.globe.ellipsoid);

and use that value for the destination of the flight.



Hmmm i just tried it
var dest = Cesium.Cartesian2(500, 50), viewer.scene.globe.ellipsoid);


dest.z =;



But it didn’t do what i want, is there something wrong with my code?

The code looks fine. If that’s not the behavior you want, than I think I misunderstood what you’re trying to do. Can you please elaborate?


Hannah, imagine you wanna move the position of the camera x pixels right, say, for displaying a custom popup on screen if it popups half-way off-screen.
What would be the way?

Just wanna get current camera position and add x pixels to the right!