Issue Loading ArcGIS MapServer Tile Layer in Cesium

I am trying to load a specific ArcGIS MapServer tile layer in Cesium using Cesium.ArcGisMapServerImageryProvider, but I am unable to get it to display correctly.

Here are the details:

  • MapServer URL: http://27.101.20.35:6080/arcgis/rest/services/airPhoto_intra2/G2025_10/MapServer

  • Code used:

my3DMap.gsImageModel = new Cesium.ProviderViewModel({
	creationFunction: function () {
		return Cesium.ArcGisMapServerImageryProvider.fromUrl(
            window.app.arcgisHost+'/arcgis/rest/services/airPhoto_intra2/G2025_10/MapServer',
			{
				enablePickFeatures: false
			}
		);
	}
});
viewer.baseLayerPicker.viewModel.selectedImagery = my3DMap.gsImageModel;
  • Errors in console:

    • Failed to obtain image tile X: ... Y: ... Level: ... (404 Not Found)

    • TypeError: Cannot read properties of undefined (reading 'getDerivedResource')

    • TypeError: t[n].queueReprojectionCommands is not a function

  • Tile info from ArcGIS REST service:

    • Levels of detail: 0–11

    • Spatial Reference: 102100 (Web Mercator)

    • Origin and full extent are defined in meters, but the tiles generated by the service do not seem to match Cesium’s expected row/column scheme.

I have successfully loaded other MapServer layers with similar code, so it seems specific to this layer. I suspect it may be related to the tile indexing, spatial reference, or non-standard tiling scheme.

Could you please advise how to properly load this type of ArcGIS tile layer in Cesium?

Thank you very much for your help.

Hi @grsghqnzo,

Welcome to the CesiumJS forum! I’m not sure what the issue is here right off the bat, but a few observations / questions:

  1. Have you tried contacting this mapserver endpoint outside of a CesiumJS context? Are you able to connect to it / get responses other than 404s for known tiles?
  2. Is there a reason you’ve gone with this ProviderViewModel approach? I don’t see any examples using this API in sandcastle, and I’m honestly unfamiliar with it. I wonder if you’d have more success with something of this style (using .fromURL rather than .fromBasemapType).
  3. Otherwise, just as a guess, perhaps there’s a tiling scheme mismatch between CesiumJS and ArcGIS mapserver. Again, I’d suggest trying to make manual requests for tiles you know exist in the data set and see if you can get back something other than a 404.

Hope that helps (at least as a start).

Best,
Matt