Esri / elevation-profile-template

Elevation Profile is a configurable application template used to display the elevation profile for a selected feature or a measured line along with a web map.
Apache License 2.0
29 stars 27 forks source link

Default profile to line feature #11

Open MarkCooperSDC opened 7 years ago

MarkCooperSDC commented 7 years ago

Hi

I don't know if this is the correct place to post this, but is there a way to get the elevation profile to be produced by default based on a line feature within the map and disable the ability to retrieve a profile based on a drawn line?

Thanks Mark

jgravois commented 7 years ago

the sketched line geometry is passed along to be used to generate an elevation profile here.

it'd be up to you to define a hardcoded line feature of your own instead. you can find an example of programmatically created graphics below.

https://developers.arcgis.com/javascript/3/jssamples/toolbar_edit.html

kellyhutchins commented 7 years ago

We should add an option that allows you to hide the draw tool to the configuration panel. I'll do that for the next release. For now you can paste the following css into the 'Custom Css' box on the Theme tab in the configuration panel to hide the draw tool. .icon-draw{display:none}

You can also setup the app so a line is selected by default using the options on the 'Custom Url Parameter' tab to define a url parm that lets you select the feature to show on startup. In this example I setup a url param called name and pointed it to the name field in the trails feature layer. Then I append the trail name I want to display to the app url like this: http://www.arcgis.com/apps/Profile/index.html?appid=fac840867e5c41699ce73ac94fccf169&name=Loowit%20trail

MarkCooperSDC commented 7 years ago

Thank you - that really helps.

I dont suppose there is an easy way to add a logo to the app is there?

kellyhutchins commented 7 years ago

@MarkCooperSDC you'd need to download and host the app locally and add a logo. Where would you want the logo to display?