moving from google earth

  1. There is different way of the zoom behavior from the cesium and the google earth. In google earth in the zoom in the center of the zoom is the mouse cursor, while in cesium always the center of the zoom will be the center of the canvas.

Is there a way to have the same behavior in cesium? Where in the code I need to do changes?

Is there a future plan to have in cesium the zoom of google?

  1. If I want to calculate distance in meters between two coordinates (with height). How can I do that? I can know the distance between two cartesians, but I want to convert it to meters

Thanks

Hi,

For camera zoom, see https://github.com/AnalyticalGraphicsInc/cesium/issues/302

For the distance, do you just need the distance between two points along the straight line between them? Or do you need to take into account the curvature of the ellipsoid or terrain?

Patrick

hey,

Thanks for the camera zoom link

as for distance, I realized that all the cartesians are in meters, so also the distance is in meters.

But, in 3d if i want to calculate distance between two cartesians on the ground, I will get the distance bellow the ground, and I want the distance on the ellipsoid, so how I do that? and also how i calculate with terrain?

Thank you very much

By distance below the ground I assume you mean straight line distance. Here’s a link for distance along the ellipsoid https://cesiumjs.org/Cesium/Build/Documentation/EllipsoidGeodesic.html I believe surfaceDistance is what you seek. Accounting for the terrain is tricky, I don’t believe there is any thing built into Cesium to calculate that, at least not yet.