XMLHttpRequest cannot load http://assets.agi.com/stk-terrain/world/layer.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 503.
Thanks.
I am a university student in Japan. I use Cesium in my research activities.
Is it understanding that STK is no longer usable?
How do I move to Cesium ion?
Cesium.Ion.defaultAccessToken = 'my_access_token';
var viewer = new Cesium.Viewer('cesiumContainer',{
terrainProvider : new Cesium.CesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(1)
})
});
Thanks for your reply.
I'm really happy to reply. Thank you very much.
I am a Japanese college student and I use Cesium in my research activities.
Because English is not good at it, it may be a childish sentence, but please forgive me.
I am developing a simulator as if the image is moving on the map by displaying the image on the map displayed by Cesium and shifting the center latitude and the center longitude of the image.
To obtain the latitude and longitude, we use the following code.
Cesium.loadJsonp ('// dev.virtualearth.net/REST/v1/Locations')
Now, transitioning to Cesium Ion, the globe is now displayed. However, if you execute it, an error will appear in the previous code.
viewer.terrainProvider = new Cesium.CesiumTerrainProvider ({
url: '//assets.agi.com/stk-terrain/world'
});
This code is the previous code, but with this code you can successfully get latitude and longitude by loadJsonp.
Can CesiumIon get loading data with loadJsonp?
I have signed up cesium ion account. I will try to render terrain type asset in my application, but it didn't work. I am using below code :
Cesium.Ion.defaultAccessToken = 'myAccessToken';
var terrainProvider = new Cesium.CesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(3956)
});
viewer.terrainProvider = terrainProvider;
Didn't get any error and terrain not working.