Here is a simple elevation profile app but it's not working. After you draw the line, no profile is plotted.
https://codepen.io/lkoumis1/pen/LYgwVWP
It appears that your webmap does not have a ground elevation layer included (which is required to create the profile).
Add the ground parameter to your web map and it should work:
const map = new WebMap({ basemap: "topo-vector", ground: "world-elevation" });
THanks. I guess things are completely different with API 3.x. I have another app with the elevation profile on JS API 3.x and it is working with streets basemap.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.