Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scene.camera.pickEllipsoid is not a function #10

Open
carsonpowers opened this issue Apr 27, 2015 · 7 comments
Open

scene.camera.pickEllipsoid is not a function #10

carsonpowers opened this issue Apr 27, 2015 · 7 comments

Comments

@carsonpowers
Copy link

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

@leforthomas
Copy link
Owner

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.

@carsonpowers
Copy link
Author

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.

@leforthomas
Copy link
Owner

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.

@carsonpowers
Copy link
Author

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

@alberto-acevedo
Copy link

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

sclem pushed a commit to sclem/cesium-drawhelper that referenced this issue Mar 2, 2016
…eate-mode

Add startDrawingEllipse functionality
@ChristineMarie
Copy link

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?

@basilmohammed
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants