How can we add MapImageLayer into webscene Portal item as in two 2d we can add into Map so how we can add on 3D ?

180
2
08-18-2019 09:40 PM
AnupamSharma
New Contributor III

Here is snap of code which is not working

Thank you in advance 

Tags (1)
0 Kudos
2 Replies
SaschaBrunnerCH
Esri Contributor

It is the same for 2D and 3D.

See: MapImageLayer | ArcGIS API for JavaScript 4.12 

Section: Reference an ArcGIS portal Item ID

// references an ArcGIS Online item pointing to a Map Service Layer
var layer = new MapImageLayer({
  portalItem: {  // autocasts as esri/portal/PortalItem
    id: "d7892b3c13b44391992ecd42bfa92d01"
  }
});
map.add(layer);  // adds the layer to the map‍‍‍‍‍‍‍‍‍‍‍‍‍‍
ThanHtetAung_EsriAu
Esri Regular Contributor

Hi Sharma,

I create sample code for you, below is the codepen url

https://codepen.io/thanhtetaung/pen/xxKEKoe 


map.layers.add(permitsLayer)

or 

Initialized map with layers, that will work

0 Kudos