Problem with Ellipsoid.cartographicToCartesian

When calling viewer.scene.globe.ellipsoid.cartographicToCartesian I keep getting a Cartesian3 with NaN values for x, y, and z.

Here are the values

  1. cartesian_0_g$: o
  2. x: NaN
  3. y: NaN
  4. z: NaN
  5. proto: o
  6. cartographic_0_g$: o
  7. x: 1098265.9711996259
  8. y: -4902148.7220744
  9. z: 3916630.8851897623


Can you paste a code sample that makes this happen? There might be a problem with your data.



Your cartographic values should be in WGS84 radians, the values you provided are extremely large and look like they may be in a difference projection. If they are in Geographic or WebMercator, you can unproject them using the equivalent GeographicProjection and WebMercatorProjection objects in Cesium.