cesium-drawhelper
cesium-drawhelper copied to clipboard
scene.camera.pickEllipsoid is not a function
When I try to host the cesium-drawhelper-master directory in IIS I can load the page fine but when I click on any off the tool icon it says: scene.camera.pickEllipsoid is not a function
Hi, which version of Cesium do you use? I haven't updated the DrawHelper since 1.0, so it's possible there has been some API changes since then.
I'm using the Cesium js file provided in the downloadable zip for this project. I've tried adding different versions but I still get the same error.
I have my project hosted publically: http://bit.ly/1bwo5bx if that helps you at all.
I REALLY appreciate any help.
Can you compare with the online demo version http://pad.geocento.com/DrawHelper/? At first sight, it looks like you are using an older Cesium for your application.
It is not a different version. I'm using the Cesium.js provided in the downloadable zip on this github. Just to make sure I just went into the resources for the page: http://pad.geocento.com/DrawHelper/? and took the cesium.js file it was using and it still is doing the same thing.
That website I gave you is just the unchanged directory the zip created when it was unpacked
I'm using the drawHelper in Cesium 1.8. I made some minor corrections to make it to work. The issue I was having was unhandlled undefined markers and mouseHandlers. The fixes are below:
In the startDrawingMarker's startDrawing function:
_.prototype.startDrawingMarker = function(options) {
var options = copyOptions(options, defaultBillboard);
this.startDrawing(
function() {
//markers.remove(); //---> unhandled undefined condition
// mouseHandler.destroy(); //---> unhandled undefined condition
if (markers) markers.remove();
if (mouseHandler) mouseHandler.destroy();
tooltip.setVisible(false);
}
);
.........
.............
In the startDrawingPolyshape's startDrawing function:
_.prototype.startDrawingPolyshape = function(isPolygon, options) {
this.startDrawing(
function() {
debugger;
primitives.remove(poly);
//markers.remove(); //---> unhandled undefined condition
//mouseHandler.destroy(); //---> unhandled undefined condition
if (markers) markers.remove();
if (mouseHandler) mouseHandler.destroy();
tooltip.setVisible(false);
return positions;
}
);
..................
...................
Alberto
Hi, I am also having the following error: TypeError: scene.getCamera is not a function var cartesian = scene.getCamera().pickEllipsoid(position, ellipsoid); I am using the version of Cesium that comes with the plug in. Was this ever resolved?
When I try to host the cesium-drawhelper-master directory in IIS I can load the page fine but when I click on any off the tool icon it says: scene.camera.pickEllipsoid is not a function
Same here for me too. I think the version difference is creating issue.