|
POST
|
well I added line 05 to pull in the reference Marker information from the gp service. Then I added line 24 with the attributes from the LRM_DC_RM_MI1 table. Before I added those 2 lines I had it working and would return the following result. I was wanting to return the RM information as well. I guess I could do another array and table.
... View more
09-10-2015
01:39 PM
|
0
|
8
|
2184
|
|
POST
|
I'm a novice at js. have the following js code I'm have an issue with. I get the following error "Unable to get property 'toFixed' of undefined or null reference" Here is the code. I was trying to add line 13 to return a second set of results from the LRM_DC_RM_MI1 table. When I add break points through the console it appears to return the correct values. Any idea what I'm doing wrong. function (jobInfo) {
this.gp.getResultData(jobInfo.jobId, "LRM_DR1", lang.hitch(this, this.renderResult));
this.gp.getResultData(jobInfo.jobId, "LRM_DC_RM_MI1", lang.hitch(this, this.renderResult));
function (result) {
this.shelter.hide();
var resultArray = result.value.features;
var resultString = '<table class="test"><tr><td>Route</td><td>Accumulated Mileage</td></tr>';
if (resultArray.length > 0) {
//loop through and populate table
for (var i = 0; i < resultArray.length; i++) {
'<tr><td>' + resultArray.attributes.RID + '</td><td>' + resultArray.attributes.MEAS.toFixed(3) + '</td></tr>';
'<tr><td>' + resultArray.attributes.ROUTE + '</td><td>' + resultArray.attributes.OFFSETtoFixed(3) + '</td></tr>';
'</table>';
else {
//Return No results message
"No result Returned please click on Route";
... View more
09-10-2015
12:31 PM
|
0
|
11
|
5372
|
|
POST
|
I've looked around but have not found an answer yet. So I have a collection of widgets in one folder. I'm wondering if there is a way to set focus on the first widget and on lt have that one expanded when the folder is opened. So from the attached example my legend is the first widget. I would like that one expanded but the others collapsed. :Is this possible?
... View more
09-10-2015
11:47 AM
|
0
|
5
|
3755
|
|
POST
|
Robert, As always you are of great help. Thank you.. Terry
... View more
09-09-2015
06:17 AM
|
0
|
0
|
773
|
|
POST
|
I would like to change the color of the banner on my application. currently there are only 8 color options. Does anyone know if there is a CSS that I can change the color of the top banner? TIA
... View more
09-09-2015
06:03 AM
|
0
|
2
|
1460
|
|
POST
|
Robert, Ok, I have my validation to ensure the coordinates that are entered are numbers. I was also going to validate that the created point was located in Montana. Do you know of a function for something like this? I found this and thought it might work. What are your thoughts? if( bb.ix <= p.x && p.x <= bb.ax && bb.iy <= p.y && p.y <= bb.ay ) { // Point is in bounding box } Else { //return error message “out of Montana” } bb is the bounding box, (ix,iy) are its top-left coordinates, and (ax,ay) its bottom-right coordinates. p is the point and (x,y) its coordinates.
... View more
09-08-2015
10:46 AM
|
0
|
0
|
1154
|
|
POST
|
Ok, I got to work for the validation of my return route segment widget. I wanted to add the following validation to my get location from coordinate widget. But the onClick does not seem to close the function. Any ideas? _onlatlongClicked: function () { GLOBE.wkid = 4326; if (this.LatTextBox.value) { if ((!isNaN(this.LatTextBox.value) && !isNaN(this.LongTextBox.value))) { var Lat = this.LatTextBox.value, Long = this.LongTextBox.value, LocPoint = new Point(Long, Lat), mp = { mapPoint: LocPoint }; } else { var qMessage = new Message({ type: 'Error', titleLabel: "Invalid Corrdinate", message: "Please re-enter valid valid coordinate", button: [{ label: "Data Entry Error", onClick: lang.hitch(this, lang.hitch(this, function () { qMessage.close(); })) }] }); }
... View more
09-08-2015
08:21 AM
|
0
|
0
|
1154
|
|
POST
|
Good Morning Robert, How do I return to the function when one of my “else” statements fails? After thinking about it I don’t want to draw an incorrect segment. else if (locError === "ROUTE NOT FOUND") { return new Message({ titleLabel: "Data Entry Error", message: "Invalid Corridor name please re-enter" }); I think it would go here after the ok is clicked from the return newMessage }
... View more
09-08-2015
05:39 AM
|
0
|
0
|
1154
|
|
POST
|
Will the new Message return a popup displaying the title and message?
... View more
09-03-2015
08:14 AM
|
0
|
0
|
1154
|
|
POST
|
Do you think I should draw the feature if they enter an invalid from or to point? renderResult: function (result) {
console.info(result);
var locError = result.value.features[0].attributes.LOC_ERROR
if (locError === "No ERROR") {
draw it
} else if (locError === "ROUTE NOT FOUND") {
return message "Invlaid Corridor name please re-enter"
} else if (locError === "PARTIAL MATCH FOR THE FROM-MEASURE") {
return message "Invlaid Beggining Accum. Mileage please re-enter"
} else if (locError === "PARTIAL MATCH FOR THE TO-MEASURE") {
return message "Invlaid Ending Accum. Mileage please re-enter"
}
var allFeatures = [];
var lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 255, 0, 0.9]), 8);
if (result.dataType === "GPFeatureRecordSetLayer") {
var features = result.value && result.value.features;
if (features && features.length > 0) {
array.forEach(features, lang.hitch(this, function (feat) {
allFeatures = allFeatures.concat(feat);
feat.setSymbol(lineSymbol);
this.map.graphics.add(feat);
}));
}
}
//
this.shelter.hide();
... View more
09-02-2015
02:20 PM
|
0
|
0
|
1153
|
|
DOC
|
Cary, Can you give me a set of cords you would want to plot?
... View more
09-02-2015
11:59 AM
|
0
|
0
|
11090
|
|
POST
|
When I get a chance to start working on this will my “if” statements be in the located in the following section of code? renderResult: function (result) {
console.info(result);
var allFeatures = [];
var lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 255, 0, 0.9]), 8);
if (result.dataType === "GPFeatureRecordSetLayer") {
var features = result.value && result.value.features;
if (features && features.length > 0) {
array.forEach(features, lang.hitch(this, function (feat) {
allFeatures = allFeatures.concat(feat);
feat.setSymbol(lineSymbol);
this.map.graphics.add(feat);
}));
}
}
//
this.shelter.hide();
if (allFeatures.length > 0) {
try {
var extent = graphicsUtils.graphicsExtent(allFeatures);
if (extent) {
this.map.setExtent(extent.expand(1.4));
}
} catch (e) {
console.error(e);
}
}
}
... View more
09-02-2015
09:10 AM
|
0
|
10
|
1336
|
|
POST
|
sorry again clear as mud.. I just did not type the rest out. I meant that "repeat this for cases of starting point is before the start of the route, ending point is past the end of the route." If the starting point was before the start of the route the error would be "Partial MATCH for the from-measure" and the response would be something like "please enter valid starting location",and like you said if the ending location is past the end length of the segment the error would be "PARTIAL MATCH FOR THE TO-MEASURE" with a return message of "please check length of route as entered ending location is past the length of route"
... View more
09-02-2015
07:21 AM
|
0
|
12
|
1336
|
| 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
|