Error when adding hosted scene layer

289
1
05-10-2023 08:17 PM
Blakearc
New Contributor II

Hi all.

I am struggling to display a hosted scene layer on the web application. The layer is a 3d model of a floor in a building. (Due to security issue, I am not able to share the access of the layer)

I initiate the scene as the following

const bSceneLayer = new BuildingSceneLayer({
url: my_url,
});

const map = new Map({
basemap: "osm-light-gray"
});

const view = new SceneView({
container: "viewDiv",
map: map
});

map.add(bSceneLayer);


The error below returned and the layer was failed to displayed.

Screenshot 2023-05-11 at 11.12.31 AM.png

I also tried to comment out the basemap property. Then the scene layer showed correctly but another camera error occurred (illustrated in another post). How to resolve this error?

 

Besides, is there any option to avoid basemap rendering? I just want a plain background with the 3d model on top.

 

Thanks for everyone helping.

1 Reply
ArnoFiva
Esri Contributor

Similar to your other question regarding camera, the spatial references of the "osm-light-gray" basemap does not match with the one from your building scene layer. Either you have to provide a basemap in the same spatial reference, or you have to initialize the Map object without a basemap.

 For more information about supported coordinate system and what projections can be combined, see the SceneView documentation: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#supported-co...