Perhaps I am confused but I want to use a shared layer from my ArcGIS Online account in a Web AppBuilder script similar to this:
const view = new MapView({
container: "viewDiv",
map: new WebMap({
portalItem: { // autocasts as new PortalItem
id: "372b7caa8fe340b0a6300df93ef18a7e"
},
layers: [
new FeatureLayer({
portalItem: { // autocasts as new PortalItem
id: "6012738cd1c74582a5f98ea30ae9876f"
},
labelingInfo: [labelClass],
renderer: {
type: "simple", // autocasts as new SimpleRenderer()
symbol: {
type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
color: "rgba(0,100,0,0.6)",
size: 3,
outline: {
color: [0, 0, 0, 0.1],
width: 0.5
}
}
}
})
]
}),
center: [-116.9250, 34.2501],
zoom: 14
});
Essentially I want to utilize either the portalItem id or add it using the arcGIS online url for the layer like this:
var transportationLayer = new TileLayer({
url: "https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer",
id: "streets",
visibility: false
});
How do I do this? When I go to my layer in ArcGIS online, I do not see the id or a url I can use.