Noticed that in the second section of this blog that the esri maps
returned an error on ArcGISMapServerImageryProvider ... failed to obtain
image tile: http://cesium.agi.com/blog.html
Also couldn't find any reference to what the esri image service needed
to be. Looking at the example this service is tiled and in projected
wgs 1984 web mercator (auxiliary sphere) coordinate system? Could the
esri image service be a dynamic map (not tiled) and in any coordinate
system (geographic wgs 1984)?
This example from the blog works in Chrome and Firefox for me. Perhaps the Esri server was down? If not, can you send us the errors in the console?
This hosted example uses a slightly newer Cesium version than b12 so if it works for you, but b12 doesn’t, you can pull the latest version from github. b13 will be released at the start of February.
Someone more familiar with the code can answer your other question.
Also couldn’t find any reference to what the esri image service needed
to be. Looking at the example this service is tiled and in projected
wgs 1984 web mercator (auxiliary sphere) coordinate system? Could the
esri image service be a dynamic map (not tiled) and in any coordinate
system (geographic wgs 1984)?
ArcGIS map servers come in two varieties: tiled and untiled. A tiled MapServer must use WKID 102100 (web mercator) tor 4326 (WGS84 geographic). An untiled MapServer can generally provide images in any spatial reference requested, so the source imagery can be in any spatial reference and ArcGisMapServerImageryProvider will ask the server to reproject it to 4326.
If you have a tiled server but it is not 102100 or 4326, you can set the usePreCachedTilesIfAvailable property to false when you construct the ArcGisMapServerImageryProvider. This will cause it to treat the server as if it is untiled.
Let me know if that is unclear or if I didn’t completely answer your question.
I WAS able to get the esri blog example to work once I pull down the master branch.
Kevin I do understand what you are saying, thanks for the clarification. I am still having an issue with the (untiled) DynamicMapService that I am hosting on my internal esri server.
I get many messages like the following which is why I asked if the DynamicMapService service could be used:
An error occurred in "ArcGisMapServerImageryProvider":
Failed to obtain image tile X: 17 Y: 12 Level: 5.
An error occurred in "ArcGisMapServerImageryProvider":
I think it should work with a dynamic map service. Take a look at what URLs Cesium is trying to access. Make sure they’re the ones you expect and that they’re not returning errors. Google Chrome has built-in tools to look at the requests a page is generating, or you can use Firebug in Firefox. If you can reproduce the problem on a public Esri server I can take a look at it.
please find attached the screenshot regarding the error that I get with Imagery Layers example in sand castle, I am using ### b13 - 2013-xx-xx on a Ubuntu Apache web server.
From the screen shot, it looks like the problem is that the /proxy/ service is missing from your web server.
WebGL does not allow applications to use images downloaded from non-origin servers to be used as textures unless those servers explicitly grant this permission. By non-origin server, I mean any server or port other than the one that served the Cesium HTML page. Unfortunately, ArcGIS Server does not include the necessary headers, called CORS headers, to allow non-origin access. As a workaround, Cesium routes ArcGIS server requests through a proxy that requests the resources itself and then serves them from the same origin. Your Apache server does not include the required proxy service.
The easiest way to get the proxy service is to use the server that comes with Cesium instead of Apache. If you need to use Apache, you’ll need to add a similar service to your Apache server. I can’t know enough about Apache to help you with that, but maybe someone else here can.
Kevin is correct, the Sandcastle examples currently assume that a proxy is running at “/proxy” relative to the server that is serving the examples. In the long run, you are best off configuring your own proxy, but a simple workaround you can try in the meantime is using the proxy that we have set up on cesium.agi.com, which is configured to return the correct cross-origin headers.