cesium-drawhelper icon indicating copy to clipboard operation
cesium-drawhelper copied to clipboard

scene.camera.pickEllipsoid is not a function

Open carsonpowers opened this issue 9 years ago • 7 comments

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

carsonpowers avatar Apr 27 '15 15:04 carsonpowers

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.

leforthomas avatar Apr 27 '15 16:04 leforthomas

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.

carsonpowers avatar Apr 27 '15 16:04 carsonpowers

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.

leforthomas avatar Apr 27 '15 16:04 leforthomas

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

carsonpowers avatar Apr 27 '15 17:04 carsonpowers

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

alberto-acevedo avatar Apr 27 '15 17:04 alberto-acevedo

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?

ChristineMarie avatar Jul 21 '16 20:07 ChristineMarie

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.

basilmohammed avatar Feb 04 '20 10:02 basilmohammed