-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElevationProfile.js
55 lines (46 loc) · 1.41 KB
/
ElevationProfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dijit/_WidgetsInTemplateMixin',
'dojo/text!./Elevation/templates/Elevation.html',
'esri/dijit/ElevationProfile',
'dojo/dom',
'dojo/on',
'dojo/topic',
'xstyle/css!./Elevation/css/Draw.css'
], function (
declare,
_WidgetBase,
_TemplatedMixin,
_WidgetsInTemplateMixin,
template,
ElevationProfile,
dom,
on, topic
) {
return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
widgetsInTemplate: true,
templateString: template,
postCreate: function () {
this.inherited(arguments);
},
startup: function () {
on(dijit.byId("elevunitsSelect"), "change", function (value) {
topic.publish('elevation/measureUnits', value);
})
},
drawLine: function() {
topic.publish('mapClickMode/setCurrent', 'measure');
topic.publish('elevation/polylineclick', 'polyline');
},
drawFreehandLine: function() {
topic.publish('mapClickMode/setCurrent', 'measure');
topic.publish('elevation/polylineclick', 'freehandpolyline');
},
clearGraphics: function(){
topic.publish('mapClickMode/setCurrent', 'identify');
topic.publish('elevation/deactivate', 'click');
}
})
});