Hello,
I am running into a pretty simple problem that I can’t figure out. I was following this tutorial here on adding a label to a polyline at its midpoint via the callbackProperty:
Here is my implementation:
The issue lies with this line of code:
geodesic.setEndPoints(leaderPosCart, endCartographic);
The leaderPosCart is static and defined at the top of the file. However, the endCartographic that is being derived is a pretty weird value (logged in the console in the example I posted):
(-1.431160649123852, 0.6283185307179595, 999999.9999983998)
The height seems weird, but even if I try doing
endCartographic = Cesium.Cartographic.fromCartesian(endPoint);
endCartographic.height = 1000000;
before running geodesic.setEndPoints(leaderPosCart, endCartographic)
, I still get the same error.
Can someone please help me figure out what I am doing wrong? I am just trying to put a label in the middle of my polylines. Thank you.