Select to view content in your preferred language

Elevation Profile Widget Version 2.24 - 8/3/2022

257896
285
03-02-2015 06:56 PM
Labels (1)

Elevation Profile Widget Version 2.24 - 8/3/2022

Live Preview Site   

Web AppBuilder for ArcGIS | Help - Elevation Profile Widget

 

List of the latest enhancements and changes:

  1. Added setting to change the coordinate system (WKID) of the exported profiles csv coordinates. 

 

Older enhancements or changes

  1. Fixed issue with precision missing from settings UI
  2. Updated to WAB 2.17
  3. Fixed issue with using this widget in Tab Theme. Profile hiding the close button on the sidebar controller.
  4. Now when used in the Jewlerybox and tab theme it will open those controllers automatically.
  5. Added ability to select existing line features to profile.
  6. Added ability to choose which segment of the selected polyline to profile.
  7. Added setting to control elevation decimal precision.
  8. Fixed Issue with resizing widget and profile getting cut off.
  9. Moved all widget links to a widget menu instead.
  10. Added the ability to export Profile data to CSV file.
  11. Added the ability to flip the profiles direction of travel.
  12. Added support for doing profiles when basemap is not Web Mercator
  13. Added the ability to export the profile chart as an image (if you are not using Internet Explorer and your browser supports HTML5 Canvas).
  14. Added fix for Launchpad Theme UI issues

 

Features:

 

  • This is a port over of the Elevation Profile Template.
  • Some modifications have been done to prevent chart indicator text clipping
  • The chart display features like color, font size, etc are all configurable in the widget settings UI
  • Some validation is done on the profile task service url.
  • Full help documentation is provided for configuring and using the widget.

 

GUID-BBD63087-70CB-4233-9BFC-DAA5B71F8F5A-web.png

GUID-7F98552A-5D81-4E17-815B-157BDB9E4EE4-web.pngGUID-65a048a8-e968-45f2-9fbc-7170fca46108-web.png

Labels (1)
Attachments
Comments
RobertScheitlin__GISP
MVP Emeritus

Tim,

   No none at all. My suggestion would be to downgrade to the 2.8 version

https://gis.calhouncounty.org/WAB/v2.8/other/ElevationProfile.zip 

TimothyPierce
Occasional Contributor

Thanks, Robert! Really appreciate all the great WAB widgets.

Thanks,

Tim

HunterCarver
Regular Contributor

Seems to be Theme dependent.  OK button does not work on any themes that have the in panel widget button but I can add with a theme that only has header widgets and then change back to a theme with in panel and it will be in the header widget row there.  However using it from there the results chop off the bottom of the chart and the horizontal axis labels.  Hope you can get this worked out it would be very handy.

thanks!

SibghatUllah1
Regular Contributor

i want to display two selected lines profile on a same graph with different color. Please suggest me.

RobertScheitlin__GISP
MVP Emeritus

Not currently possible in this widget

MichaelBean
New Contributor

Hi Robert, thanks for all your contributions. 

I am also blocked with the undefined _i18nLabels_featureAction_profileLine element in widgetJson.manifest when hitting Ok button to accept settings. I assume still a mystery why it works for some and not for others.

I'm new to custom widget development and framework as well as how this element is populated from widget files.  I hoping to get deeper and perhaps add a few additional features to the Elevation Profile widget.  This would include calculating running totals for elevation gained and loss and possible slope graph.

Yes I downgraded to your 2.8 version.

Mike

MichaelBean
New Contributor

Looking at function addI18NLabelToManifest in utils.js it would appear that a widget needs _widgetLabel defined in <widget>\nls\strings.js in order to populate _i18nLabels_featureAction_<actionName> in widgetJson.manifest.

I added:


_widgetLabel: "Elevation Profile",

to:

ElevationProfile\nls\strings.js

and I am able to add the Elevation Profile widget to my web app.

Perhaps there is more to the fix than what I found but I thought I would share what seems to have worked for me.

Mike

RobertScheitlin__GISP
MVP Emeritus

Michael,

   Sweet. Obviously this is a bug in WAB as the _widgetLabel property is not suppose to be required. I see that in my other widgets that have custom widget actions they already have the _widgetLabel property. Thanks for the info.

by Anonymous User
Not applicable

Robert,

Firstly, great widget. I set this up in an app for our zoning department and they love the tool! Going back to what Raviteja was asking above, I would like to change the default measurement units to Feet, not miles. I can't find anywhere in the widget folder, where I can make this customization. With other widgets I have incorporated into my apps, you can find the HTML code and make a change looking something like this within the unit options: <option value="Feet" selected="selected">${nls.unitsFeet}</option>

I am wondering within your widget if there is a way I can do this? I can't seem to find any place to make this change. I noticed in your response to Raviteja that you used the JS API Measurement Dijit for that portion of the widget. Do you think you could give me a little more background on this?

I found this piece of code in the Widget.js file that I think has to do with the Measurement Dijit:

I am specifically looking at lines 280 & 281. Do I just have to manipulate this piece of code to change the default unit settings?

Am I missing something? Any guidance you have would be greatly appreciated.

Thanks in advance.

Siona Roberts

RobertScheitlin__GISP
MVP Emeritus

Siona,

   That is the exact place just change Units.MILES to Units.FEET

MichaelBean
New Contributor

Not sure if the icon is missing or just black on black, thoughts?

Missing Icon in pop up

Thanks,

Mike

RobertScheitlin__GISP
MVP Emeritus

Michael,

  Looks like a dark icon issue. I will have to look into this.

Ángel_DanielSuárez_Calero
Emerging Contributor

Hi Robert! Thanks for this wonderful widget. I tried to do a modification in the MouseIndicator but I did not get the expected result. I tried add a new MouseIndicator with a same properties that "indicatorProperties2" but with other offset and I can´t see the new MouseIndicator in the graph. Do I need to do another thing?

Thanks and best regards!! 

RobertScheitlin__GISP
MVP Emeritus

Each data series in the chart can only have one indicator. So if you wish to add another indicator you need to add another data series. The best route is to duplicate the water series with a different name.

Ángel_DanielSuárez_Calero
Emerging Contributor

Thanks a lot Robert!! 

AliBarakat
Frequent Contributor

hello everyone,

hope you are all safe.

I just want to check if the link is still working please

https://gis.calhouncounty.org/WAB/V2.14/widgets/ElevationProfile/index.html 

I'm not able to access it, is there a new link?

Thank you.

AliBarakat
Frequent Contributor

Robert Scheitlin, GISP‌ maybe Robert can help

RobertScheitlin__GISP
MVP Emeritus

Link still works. Just tested it.

JamesMarok1
Regular Contributor

I know I asked this question years ago, because I have it working in my current live site, but for the life of me I can't find the answer or figure it out.

I use the Tab Theme on my site and when I open the Elevation Widget it over-sizes the panel and removes the close button. I can't remember what I need to change to force it to stay in the default side of the sidebar-controller. Thanks Rob.

RobertScheitlin__GISP
MVP Emeritus

James,

   The tab theme sidebar is not a great fit for this widget, but here is the fix:

      onOpen: function () {
        if (this.lastMeasure && this.measureTool) {
          this.measureTool.measure(this.lastMeasure);
        }
        var panel = this.getPanel();
        var pos = panel.position;
        if(this.appConfig.theme.name === 'TabTheme') {
          pos.width = 350;
        }else{
          pos.width = 720;
          panel.setPosition(pos);
          panel.panelManager.normalizePanel(panel);
        }
      },
GeoguichetGeoguichet
Occasional Contributor

Hello.
This Widget is very nice and useful thanks.
I'll try to "tune" it, but perhaps am I not the only interested:

For me, this widget will be more interesting if there was the possibility to add 2 terrain models in order to do comparison, eg. between DTM and DSM
Best regards and thanks for this work

GeoguichetGeoguichet
Occasional Contributor

Hello again.

I've a small question: I wanted to "auto-start" the profil definition.

I means, auto-activate the measurement at startup.

I tried to call the "onMeasureClick" function/event at "onOpen", but it did not work.
Did I a stupid mistake or did I miss something? Any Idea how it could be done?

Best regards and thanks!

RobertScheitlin__GISP
MVP Emeritus

In the onOpen add this line:

this.measureTool.setTool("distance",true);
GeoguichetGeoguichet
Occasional Contributor

Thanks very much!

MaxM
by
Occasional Explorer

Is it possible to modify this widget to exaggerate the vertical scale of the graph?

RobertScheitlin__GISP
MVP Emeritus

@MaxM  There is no exaggerate option in the profile task that this widget uses.

FeixRui
Emerging Contributor

Hi. Can I select a custom elevation data when using the Elevation Profile widget? The widget always uses the ESRI maps elevation data default (24m in Australia). I have a High resolution Elevation data (15cm) available and I would like to use it.  I tried to change the URL of the DEM I have but always showed as invalid. The figure below is showing the default URL of the widget.

 

FeixRui_1-1609827091187.png

Any help?

Thanks in advance

RobertScheitlin__GISP
MVP Emeritus

Yes you can use your own elevation profile GP Service if it matches the esri services paramaters for input and output. Here is a 2014 Blog on my to produce your own service:

https://www.esri.com/arcgis-blog/products/arcgis-living-atlas/analytics/setting-up-your-own-profile-...

 

FeixRui
Emerging Contributor

Thank Robert. Do you have a tutorial how to produce my own service using ArcGIS Pro? I' just allowed to use Pro... Cheers

 

RobertScheitlin__GISP
MVP Emeritus

I do not.

ZhujingXia
Frequent Contributor

I'd like to use this Elevation widget in Web app builder 2.12, where I could download the widget?

 

Thanks

RobertScheitlin__GISP
MVP Emeritus

@ZhujingXia ,

   Try using this version of the widget. If it does not work in 2.12 I can provide an appropriate link for you to download.

GeoguichetGeoguichet
Occasional Contributor

Hello.
This great widget was working fine till yeasterday.

We updated Server/Portal to 10.8.1 (and experienced many problems for that).
Print wasn't working any more until we installed the patch.

But know the profile widget does not work any more 😞

 

The Measurement Tool is not displaying (respectively is displayed for 1 second and then the widget goes blank).

I don't understeand the reason.

Does someone use it with 10.8.1 ?

We use WAB 2.13 (but did no change to it when installing 10.8.1)

Best regards and thanks.

JS console:

TypeError: Cannot set property '_newExtent' of null
at Object.<anonymous> (Measurement.js:83)
at init.js:64
at Object._successHandler (init.js:2312)
at Object._projectHandler (init.js:2697)
at init.js:64
at Object.load (init.js:2697)
at init.js:1064
at c (init.js:104)
at e (init.js:104)
at b.Deferred.resolve.callback (init.js:105) "TypeError: Cannot set property '_newExtent' of null\n at Object.<anonymous> (https://js.arcgis.com/3.29/esri/dijit/Measurement.js:83:416)\n at https://js.arcgis.com/3.29/init.js:64:337\n at Object._successHandler (https://js.arcgis.com/3.29/init.js:2312:478)\n at Object._projectHandler (https://js.arcgis.com/3.29/init.js:2697:213)\n at https://js.arcgis.com/3.29/init.js:64:337\n at Object.load (https://js.arcgis.com/3.29/init.js:2697:70)\n at https://js.arcgis.com/3.29/init.js:1064:139\n at c (https://js.arcgis.com/3.29/init.js:104:350)\n at e (https://js.arcgis.com/3.29/init.js:104:139)\n at b.Deferred.resolve.callback (https://js.arcgis.com/3.29/init.js:105:479)"
m @ init.js:115
PanelManager.js?wab_dv=2.13:83 panel [widgets_Measure_Widget_48_panel] created.
WidgetManager.js?wab_dv=2.13:115 widget [widgets/Measure/Widget] created.
WidgetManager.js?wab_dv=2.13:551 fail to open widget ElevationProfile. TypeError: Cannot read property 'navigationManager' of null
at Object._resetToolState (https://js.arcgis.com/3.29/esri/dijit/Measurement.js:76:441)
at Object.setTool (https://js.arcgis.com/3.29/esri/dijit/Measurement.js:56:458)
at Object.advice (https://js.arcgis.com/3.29/init.js:120:313)
at Object.c [as setTool] (https://js.arcgis.com/3.29/init.js:120:103)
at Object.onOpen (https://arcgis.geoguichet.ch/profile/widgets/ElevationProfile/Widget.js?wab_dv=2.13:305:20)
at Object.openWidget (https://arcgis.geoguichet.ch/profile/jimu.js/WidgetManager.js?wab_dv=2.13:549:18)
at Object.<anonymous> (https://arcgis.geoguichet.ch/profile/jimu.js/BaseWidgetPanel.js?wab_dv=2.13:169:30)
at Object.forEach (https://js.arcgis.com/3.29/init.js:71:486)
at Object.onOpen (https://arcgis.geoguichet.ch/profile/jimu.js/BaseWidgetPanel.js?wab_dv=2.13:167:13)
at Object.d (https://js.arcgis.com/3.29/init.js:198:400)
openWidget @ WidgetManager.js?wab_dv=2.13:551

GeoguichetGeoguichet
Occasional Contributor

Hello again.

 

I was auto-activating the nmeasurement tool with 

this.measureTool.setTool("distance",true);

in onOpen().

Without that, I've no more JS error, but the widget shows empty/blank, so I guess there is a problem with dojo.measurement somewhere, but don't know what could have changed here with 10.8.1, if WAB is same

 

RobertScheitlin__GISP
MVP Emeritus

@GeoguichetGeoguichet , Each version of Portal uses a different version of WAB.

https://enterprise.arcgis.com/en/web-appbuilder/latest/create-apps/about-versions.htm

for example Portal 10.8.1 uses WAB 2.16. You should try to download the latest version of this widget.

GeoguichetGeoguichet
Occasional Contributor

Thanks very much Robert, I'll check the new version and see what did change (we did our own version in order to be able to use 2 differents models - DSM + DTM)

TSya
by
Emerging Contributor

Hi @RobertScheitlin__GISP 

 

I have used the widget however, it prompts an error while creating the line on the widget which mentions on unable to execute the tool, and the elevation profile was not drawn.

 

 

RobertScheitlin__GISP
MVP Emeritus

@TSya 

Can you reproduce this issue in the Live Preview Site? Just stating that the widget gives and error and not posting the details of the error is not going to help.

FannyFortin-Delmar1
New Explorer

Hi! I'm a beginner in dev and I was hoping that que Red X (on the chart but also on the map line) could be costumized with a bike symbol. 

FannyFortinDelmar1_0-1643723487807.png

 

I suppose it's somewhere here:

FannyFortinDelmar1_1-1643723557363.png

But, i don't know how to change it to but a image src. 

Thanks for your help!

 

RobertScheitlin__GISP
MVP Emeritus

@FannyFortin-Delmar1 

That is the correct code location for the red X in the chart. To replace that with a bike in the chart you would have to get SVG code for a bike symbol and replace that section.

markerSymbol: 'm -6 -6, l 12 12, m 0 -12, l -12 12', // RED X //

For the red X on the map it is this line that would have to be changed:

var chartLocationSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_X, 13, outline, red);

You could change the SimpleMarkerSymbol to a PictureMarkerSymbol.

The second half of your request is quite complicated and will not be possible for someone who is a beginner in development.

LynnZhang2
Emerging Contributor

Hi Robert,

 

Is it possible  to standardize Y axis elevation changes  (i.e. every 10 ft  as a unit) to show slope?  In urban area, we need a SLOPE widget.

 

Thank you,

 

Sincerely,

 

Lynn

Aneel_Kumar_M
Occasional Contributor

Dear Robert,

Firstly, it is very helpful and great widget to deal with elevation data. 

I am trying to export x,y values in WGS84_UTM_zone40 (32640) and I have added the advised code (from one of the posts, deleted-user.***..) in widget.js as shown below

Aneel_Kumar_M_1-1656396601143.png

But, when i am trying to run the tool, it looks something wrong, it is keep on showing status bar.... as shown below

Aneel_Kumar_M_0-1656396265553.png

The tool was working before I modify and I am able to export csv file too.

Aneel_Kumar_M_2-1656397161249.png

Is there any place I need to change, or any other js files i need to modify ? 

do I need to change wkid anywhere?

Aneel_Kumar_M_3-1656397245554.png

please advice me.

thanks in advance.

 

LynnZhang2
Emerging Contributor
Dear Robert,



I hope to modify it and become a slope tool, showing the ratio of {100* (Elevation changes (Y)/ distance (X))}. This slope ratio and elevation change both show in a chart ( i.e 1000 feet *1000 feet ) and can be comparable through the area.



[cid:image001.png@01D88AC3.B4C9F5E0]



How an I do this?



Thank you.



Sincerely,



Lynn

RobertScheitlin__GISP
MVP Emeritus

@Aneel_Kumar_M 

Have you added the

esri/geometry/projection

AMD module to the require list at the beginning of the widgets code?

https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.projection-amd.html

 

RobertScheitlin__GISP
MVP Emeritus

Lynn,

Sorry but I can not help with that.

Aneel_Kumar_M
Occasional Contributor

Dear Robert,

thank you for the reply, 

Now I have added it 

Aneel_Kumar_M_0-1656478520951.png

Aneel_Kumar_M_2-1656479217897.png

Then I try to test, its loading.... no message

Aneel_Kumar_M_1-1656478581868.png

I have added to check the dependencies loaded or not , but no error msg

Aneel_Kumar_M_3-1656480714798.png

anything missing, any other file I need edit ?

please advise, thank you

RobertScheitlin__GISP
MVP Emeritus

@Aneel_Kumar_M  The fact that the widget is showing just loading tells me that you have your require modules and their subsequent variables out of alignment (a very common AMD coding mistake that beginners make). 

LynnZhang2
Emerging Contributor
Dear Robert,

Glad to see your response.

Is it possible to show the equal unit change of elevation change Y and X ( even start at different evaluation), and the chart can see slope change (blue area: elevation change/draw distance) more obvious and comparable?

[cid:image002.png@01D88B8A.3818D990]


Thank you,

Sincerely,

Lynn
RobertScheitlin__GISP
MVP Emeritus

@LynnZhang2 

Sorry that is not something I can help with.

ChiekJiuPoh
New Explorer

Hi Robert, 

Where could i download the widget that is suitable for arcportal 10.6?

 

Thank you

 

Version history
Last update:
‎08-03-2022 01:23 PM
Updated by: