Closed xujinghai closed 7 years ago
hi, about the cesium service:
ac-map
is the provider of cesium service (cesium viewer created for every map)provider: [cesium service]
- don't)ViewerConfiguration
service, there is an example in the demo.about the map:
new Cesium.GeographicTilingScheme()
inside the template?
the global var Cesium isnt available on the template scope, try creating GeographicTilingScheme in the component.ts fileThanks for you help! `
`
this code can be runned without errors, but it get the aboved warning information (...block the CORS policy: The 'Access-Control-Allow-Origin'...) . Then the map cannot load properly. But I try this options dirctly in the javascript file (which is adapted from the helloworld example inside the cesiumjs package), it works well, even without tilingScheme. So i doubt the problem is located in the Angular.
for cross origin check out: https://cesiumjs.org/tutorials/Imagery-Layers-Tutorial/#cross-origin-resource-sharing
when i try to load a wmts data, i get the following warning information: 'http://localhost:4500' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:4203' that is not equal to the supplied origin. Origin 'http://localhost:4500' is therefore not allowed access.
So firstly, the app load the default map, then when i zoomin the map, the app load the wmts map, but it cannot move the map.
the port of the app is 4500. here is the code of app.html just changed from the example.
I also found the options cannot support the tilingScheme. which should be something like the following code in the js. tilingScheme : new Cesium.GeographicTilingScheme(), tileMatrixLabels:['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19']
By the way, where can i get the cesiumservice. I try to get it in the app.component.ts file, but it cannot work. The code is
when i try to get cesiumViewer in the ngAfterViewInit(), it got errors. And i found the cesiumService is invalid.