Elevation profile not working?

267
2
Jump to solution
06-01-2023 02:48 PM
LefterisKoumis
Occasional Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
Tim_McGinnes
Occasional Contributor III

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"
        });

 

View solution in original post

0 Kudos
2 Replies
Tim_McGinnes
Occasional Contributor III

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"
        });

 

0 Kudos
LefterisKoumis
Occasional Contributor III

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.

0 Kudos