I am currently encountering an issue loading a web map from an ArcGIS Enterprise Portal using ArcGIS JavaScript web components.
Are there examples available for succesfully loading a web map from an Enterprise Portal?
This is going to depend on how you are building your app. Here is some documentation showing the steps to set up the esriConfig portal url.
If you are building your app from scratch with npm, I would recommend you set up the esriConfig portal url, and any auth needed before loading your components, so something like this.
esriConfig.portalUrl = something;
esriId.registerOAuthInfos([info]);
import("@arcgis/map-components/dist/loader").then(
({ defineCustomElements }) => {
defineCustomElements();
},
);
Thank you for your quick response!
After taking a second look at the links you provided, I was able to adjust the script and successfully load the web map of interest.