|
POST
|
I have been looking in Esri's Web AppBuilder for ArcGIS page and I'm wondering what the configs folder located in my application is for? Does anyone now? they look like they are related to my widgets. some have Json files while others just have icons in them.
... View more
09-02-2015
06:37 AM
|
0
|
1
|
2998
|
|
POST
|
I:'m thinking that I will add an if statement that if the LOC_error field is "NO ERROR" then return segment. else is LOC_ERROR is "Route Not Found" then return message""Please enter route with correct format." then repeat this for cases of starting point is before the start of the route, ending point is past the end of the route. Does that sound right?
... View more
09-02-2015
05:43 AM
|
0
|
14
|
1332
|
|
POST
|
I need to learn to use the ArcGIS API for javascript as a better resource for understanding syntax and requirements. My next step will be to try and incorporate a return error if the user enters an incorrect corridor name, or the route length is greater then the segment length. When I generated the service I added the LOC_ERROR field which returns these errors.. Any pointers where to start with that? Thanks again for your help.
... View more
09-02-2015
05:35 AM
|
0
|
0
|
1332
|
|
POST
|
The jack rabbit comment cracked me up. First laugh I have had in a couple weeks. thanks for the help.. I did have a few questions. 1. When you set the var gra = new graphic, I understand the rs object but what are the null's? 2.What does the this.shelter.hide do? 3. What does the extend.expand(1.4) do? 4. What does the catch (e) catch?
... View more
09-01-2015
02:30 PM
|
0
|
17
|
1332
|
|
POST
|
Its a snails pace but think I'm making progress.. I can get it o return and pass the data to the service but I see to get a url error.. function (rs) {
var RP ={
"displayFieldName": "",
"fields": [
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID"
"name": "Corridor",
"type": "esriFieldTypeString",
"alias": "Corridor",
"length": 8
"name": "from_offset",
"type": "esriFieldTypeSingle",
"alias": "from_offset"
"name": "to_offset",
"type": "esriFieldTypeSingle",
"alias": "to_offset"
"features": [{ "attributes":{
"OBJECTID": 1,
"Corridor": rs.Corridor,
"from_offset": rs.FromOffset,
"to_offset": rs.ToOffset
"exceededTransferLimit": false
var params = {
"Route_Points": RP,
this.gp.submitJob(params, lang.hitch(this, this.processGP));
function () {
var Corridor = this.CorridorTextBox.value,
this.fromOffsetTextBox.value,
this.toOffsetTextBox.value,
"Corridor":Corridor,
"FromOffset":FromOffset,
"ToOffset":ToOffset
this.executeGP(rs);
... View more
09-01-2015
12:09 PM
|
0
|
19
|
1068
|
|
POST
|
I though the _bindEvent went i nthe postCreate: function like this? function () {
this.inherited(arguments);
this.gp = new Geoprocessor("https://app.mdt.mt.gov/arcgis/rest/services/LRS/ReturnRouteSegment/GPServer/ReturnRouteSegment");
this._bindEvents();
... View more
09-01-2015
10:40 AM
|
0
|
22
|
1068
|
|
POST
|
I have a couple other widgets like this and was hoping I could limp my way to creating this one and learn from it. When I try and call the _bindEvents function I get the following. TypeError: Unable to set property 'src' of undefined or null reference TypeError: Unable to set property 'src' of undefined or null reference at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/dijit/LoadingShelter.js:42:7) at n (http://js.arcgis.com/3.13/init.js:106:75) at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/widgets/CreateRouteSegment/Widget.js:53:14) at create (http://js.arcgis.com/3.13/init.js:1123:343) at postscript (http://js.arcgis.com/3.13/init.js:1122:94) at Anonymous function (http://js.arcgis.com/3.13/init.js:108:190) at createWidget (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:285:11) at Anonymous function (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:105:21) at Anonymous function (http://js.arcgis.com/3.13/init.js:177:287) at k (http://js.arcgis.com/3.13/init.js:199:425) { : , __proto__: { : , __proto__: { }, message: "", name: "TypeError" }, description: "Unable to set property 'src' of undefined or null reference", message: "Unable to set property 'src' of undefined or null reference", name: "TypeError", number: -2146823281, stack: "TypeError: Unable to set property 'src' of undefined or null reference at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/dijit/LoadingShelter.js:42:7) at n (http://js.arcgis.com/3.13/init.js:106:75) at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/widgets/CreateRouteSegment/Widget.js:53:14) at create (http://js.arcgis.com/3.13/init.js:1123:343) at postscript (http://js.arcgis.com/3.13/init.js:1122:94) at Anonymous function (http://js.arcgis.com/3.13/init.js:108:190) at createWidget (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:285:11) at Anonymous function (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:105:21) at Anonymous function (http://js.arcgis.com/3.13/init.js:177:287) at k (http://js.arcgis.com/3.13/init.js:199:425)" } "TypeError: Unable to set property 'src' of undefined or null reference at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/dijit/LoadingShelter.js:42:7) at n (http://js.arcgis.com/3.13/init.js:106:75) at postCreate (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/widgets/CreateRouteSegment/Widget.js:53:14) at create (http://js.arcgis.com/3.13/init.js:1123:343) at postscript (http://js.arcgis.com/3.13/init.js:1122:94) at Anonymous function (http://js.arcgis.com/3.13/init.js:108:190) at createWidget (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:285:11) at Anonymous function (http://mdthlnisdp264.mdthq.mt.ads:3344/webappbuilder/apps/2/jimu.js/WidgetManager.js:105:21) at Anonymous function (http://js.arcgis.com/3.13/init.js:177:287) at k (http://js.arcgis.com/3.13/init.js:199:425)"
... View more
09-01-2015
10:32 AM
|
0
|
24
|
1068
|
|
POST
|
The other question I forgot to ask was by are my buttons different? I don’t see anything in the html that defines the color or style of the button.
... View more
09-01-2015
08:40 AM
|
0
|
26
|
1068
|
|
POST
|
Ok that mas sense as well.. So I created this function to execute when the "returnseg" button is click. I set a break point at line 2 but when I run the widget it does not seem to get there. I was expecting to see the value from the CorridorTextBox. Is my syntax for that .get('value'), correct? Do you use the debugging console through brackets or just run the application? _onreturnsegClicked: function () {
var Corridor = this.CorridorTextBox.get('value'),
FromOffset = this.fromOffsetTextBox.get('value'),
ToOffset = this.toOffsetTextBox.get('value'),
RouteSeg = new RouteSeg(Corridor, FromOffset, ToOffset),
rs = {
mapSegment: RouteSeg
};
this.executeGP(rs);
},
... View more
09-01-2015
08:25 AM
|
0
|
0
|
1068
|
|
POST
|
I posted it above. The widget is called create route segment. Thank you.. In the past when I have debugged I had to open the widget to see the widget.js file in the console. When I try it with this widget it throws an error and I cant even see the widget.js file to set a break point.
... View more
09-01-2015
07:22 AM
|
0
|
29
|
1539
|
|
POST
|
Ok, that makes sense.. I only have a few errors now, but wondering why it says stopping scanning(61% scanned)? I opened the console to attempt to debug it and it crashes with a couple errors. My problem is I don’t know where to set the break points to try and find out where the issue is.
... View more
09-01-2015
07:11 AM
|
0
|
31
|
1539
|
|
POST
|
I was able to clean some of this up, but still don't understand the beginning errors. 'define' was used before it was defined. also the expected 'dojo/_base/declare' at column 5, not column 9. What does that mean? The last thing I was wondering was errors used to show up where "defines" were not needed. Like I'm not using the "'jimu/dijit/TabContainer'" return declare([BaseWidget], {
// Custom widget code goes here
baseClass: 'jimu-widget-CreateRouteSegment',
//this property is set by the framework when widget is loaded.
//name: 'CreateRouteSegment',
//methods to communication with app container:
postCreate: function () {
this.inherited(arguments);
this.gp = new Geoprocessor("https://app.mdt.mt.gov/arcgis/rest/services/LRS/ReturnRouteSegment/GPServer/ReturnRouteSegment");
},
_bindEvents: function () {
this.own(on(this.returnseg, "click", lang.hitch(this, this._onreturnsegClicked)));
this.own(on(this.returnsegclear, "click", lang.hitch(this, this._onclearClicked)));
},
startup: function () {
this.inherited(arguments);
},
onClose: function () {
this.mapClickEvt.remove();
},
executeGP: function (rs) {
this.shelter.show();
this.map.graphics.clear();
var lineSymbol = new SimpleLineSymbol(),
SimplelineSymbol.setColor(new Color([255, 255, 0, 0.5])),
SimplelineSymbol.setWidth(2),
graphic = new Graphic(rs.mapSegment, lineSymbol),
features = [graphic],
featureSet = new FeatureSet(),
featureSet.features = features,
var params = {
"Route_Points": featureSet,
"Route_Points_Events1 ": {
"esriGeometryPolyline": true,
"HasZ": "false",
"HasM": "true"
},
"Keep_only_the_closest_route_location": false
};
this.gp.submitJob(params, lang.hitch(this, this.processGP));
},
_onreturnsegClicked: function () {
var Corridor = this.CorridorTextBox.get('value'),
FromOffset = this.fromOffsetTextBox.get('value'),
ToOffset = this.toOffsetTextBox.get('value'),
RouteSeg = new RouteSeg(Corridor, FromOffset, ToOffset),
rs = {
mapSegment: RouteSeg
};
this.executeGP(rs);
},
_onclearClicked: function () {
this.map.graphics.clear();
this.CorridorTextBox.set("value", "");
this.fromOffsetTextBox.set("value", "");
this.fromOffsetTextBox.set("value", "");
}
});
});
... View more
09-01-2015
05:43 AM
|
0
|
33
|
1539
|
|
POST
|
I’m still struggling understanding the errors in brackets. Here is a picture of the errors. It says missing a space but even if I put the space in there the error remains.
... View more
08-31-2015
07:53 PM
|
0
|
0
|
1539
|
|
POST
|
Larry, I was looking at your help widget and in the help tab there are 3 rows that say widget. What file controls the titles in the help tab? TIA Terry
... View more
08-31-2015
02:54 PM
|
0
|
0
|
2009
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-19-2015 02:57 PM | |
| 1 | 03-10-2016 08:36 AM | |
| 1 | 03-10-2016 09:00 AM | |
| 1 | 07-16-2015 01:15 PM | |
| 1 | 09-14-2015 06:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:25 AM
|