0

I'm trying to adapt a CZML example for my purpose. I start running it on my local machine after changing all the requirements but it is not running.

Only part of it is running, for example when I'm using czml for a label then it is running. Here is the code of that

{
    "id":"/Application/STK/Scenario/simple/Facility/AGI",
    "label":{
        "fillColor":{
            "rgba":[
                0,255,255,255
            ]
        },
        "font":"10pt Lucida Console",
        "horizontalOrigin":"LEFT",
        "outlineColor":{
            "rgba":[
                0,0,0,255
            ]
        },
        "pixelOffset":{
            "cartesian2":[
                12.0,0.0
            ]
        },
        "scale":1.0,
        "show":true,
        "style":"FILL",
        "text":"AGI",
        "verticalOrigin":"CENTER"
    },
    "position":{
        "cartesian":[
            1216469.9357990976,-4736121.71856379,4081386.8856866374
        ]
    }
}

But I also want to show an image at the same place, then it is not running and also not giving any error code. Here is the code for that:

{
    "id":"Headquarters",
    "availability" : "2013-11-08T09:00:00Z/2013-11-09T17:04:54.9962195740191Z",
    "billboard":{
        "color":{
            "rgba":[
                0,255,255,255
            ]
        },
        "horizontalOrigin":"LEFT",
        "image":"localhost//Cesium-b19/Apps/Sandcastle/images/DownArrow.png",
        "scale":1.0,
        "show":true,
        "verticalOrigin":"CENTER"
    }, 
    "position":{
        "epoch" : "2013-11-08T09:00:00Z",
        "cartesian":[
            1216469.9357990976,-4736121.71856379,4081386.8856866374
        ]
    }
}

What is happening with my code?

1 Answer 1

1

The URL you are using for the "image" property is not correct. It's being interpreted as a relative URL because you are missing the "http://" prefix.

The image displays correctly after replacing the "image" property with:

"image":"http://cesiumjs.org/images/Cesium_Logo.png",
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.