I am trying to get the position of billboards that are placed on my map, but I want to see the position in lat/long coordinates.
Thanks for your help,
Lydia
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I currently have the latitude, longitude, and height coordinates separated into individual variables. To combine them into one (create a Cartographic element), I am using:
var billboardPosition = Cesium.Cartographic.fromDegrees(lat, long, height);
However, now, when I try converting it back to cartesian, using Cesium.Ellipsoid.cartographicToCartesian(billboardPosition), I am getting the error: 'uncaught exception: DeveloperError: scalar is required and must be a number'. I believe this is because when the Cartographic object is created, it prints like:
({longitude: -1.6360035916051352, latitude: 0.656140155737535, height: "0"})
Why is the height surrounded by quotations? Is that why Cesium thinks it's not scalar?
Thanks, again!
Lydia
I also have another (unrelated) question about setting the color for a billboard. When a user clicks on a billboard (b1), I want to change the color of it to red. However, when the user clicks on another billboard (b2) on the same map, I want b1 to change back to it's original color. This is my code so far:
oldColor = billboard.getColor();
billboard.setColor({
red : 1.0,
On Friday, September 27, 2013 9:05:59 AM UTC-4, lydi...@visionistinc.com wrote:
oldColor = billboard.getColor();
billboard.setColor({
red : 1.0,
green : 0.0,
blue : 0.0,
alpha: 1.0
})
and then in a later part, I have:
billboard.setColor(oldColor);
However, there is no change on my map. Do you know why this is?
Thank you!!
Lydia