Reputation: 31
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?
Upvotes: 0
Views: 784
Reputation: 639
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",
Upvotes: 1