|
POST
|
I still get the 500, but simply as an error. It's not writing to the console.
... View more
05-12-2015
07:37 AM
|
0
|
0
|
1116
|
|
POST
|
I might have modified it incorrectly; here is what I updated and still get an error with a stopped web service: var requestHandle = esriRequest({
url: "http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0",
content: {
f: 'json'
},
handleAs: "json"
});
requestHandle.then(
function (lyrJSON, io) {
console.info(lyrJSON);
}, function (err) {
console.info(err);
}
);
... View more
05-11-2015
01:55 PM
|
0
|
2
|
2324
|
|
POST
|
This one I could not get to work. It just errored out if a web service was not running but did not write to the console log.
... View more
05-11-2015
01:12 PM
|
0
|
4
|
2324
|
|
POST
|
Yes, this gets me a layer name. I would basically want to say something like: If lryJSON.name = "sign" then app.signLayer = "http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0" That way I can assign layers based on verified names in the event that they are moved. Do you know what I would need to add?
... View more
05-11-2015
01:11 PM
|
1
|
1
|
1868
|
|
POST
|
Ken and Robert Scheitlin, GISP I have the JSON information here: http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0?f=pjson and I want the name of this layer. Do you know how to get the value from the name of name, which would be the name of the layer.
... View more
05-11-2015
12:32 PM
|
0
|
3
|
1868
|
|
POST
|
Exactly. I just want to know how to read the value of 500 from my code. Even an alert would help, as I want to exit my code if this code exists.
... View more
05-11-2015
12:22 PM
|
0
|
0
|
3464
|
|
POST
|
I think that is the right way to go. I got the following message when I tried that layer: Error: Error handling service request : Could not find a service with the name 'test/MapServer/StreetSignTest' in the configured clusters. Service may be stopped or ArcGIS Server may not be running. Code: 500 So, do you or Andy Gup know what I should write to evaluate an error of 500 in my code for that URL? I have looked up how to read JSON responses, but I can find code to evaluate this.
... View more
05-11-2015
12:19 PM
|
0
|
6
|
2324
|
|
POST
|
I am currently not receiving any errors when I pasted in the URL for the stopped web service. Any ideas why? Here is the stopped service location: test/StreetSignTest (FeatureServer)
... View more
05-11-2015
11:55 AM
|
0
|
2
|
3464
|
|
POST
|
I'm currently not receiving any error messages when I paste in the URL for a stopped service. Any ideas?
... View more
05-11-2015
11:49 AM
|
0
|
0
|
2324
|
|
POST
|
I just wanted to evaluate the URL. All the information should exist independent of my application running, so I wanted to check if I could see any information before consuming the service.
... View more
05-11-2015
11:48 AM
|
0
|
0
|
2324
|
|
POST
|
Okay, I have my service stopped right now at: test/StreetSignTest (FeatureServer) The URL does not provide an error by opening the page; it just shows up as blank.
... View more
05-11-2015
11:47 AM
|
0
|
9
|
2324
|
|
POST
|
I have the following code that defines my feature layers, but I would like to evaluate the layer name to ensure that the numbered layer is the correct feature that I am referencing on the chance layers are added. How would I do this? var initialExtent = new Extent({
"xmin": 777229.03,
"ymin": 1133467.92,
"xmax": 848340.14,
"ymax": 1185634.58,
"spatialReference": {
"wkid": 3435
}
});
// app configuration
var config = {
mapOptions: {
showAttribution: false,
sliderStyle: "small",
extent: initialExtent,
logo: false,
sliderPosition: "bottom-right"
},
signLayerUrl: "http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0",
supportLayerUrl: "http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/1"
}; I tried doing the following: var featureService = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer"); alert(featureService.LayerInfo[0].name); And receive the following error: ypeError: Cannot read property '0' of undefined "in domReady callback" "TypeError: Cannot read property '0' of undefined I thought that this would provide me with the name of the first layer, but I am receiving an error instead. How should I write this? And I referenced this, but there are no examples: LayerInfo | API Reference | ArcGIS API for JavaScript
... View more
05-11-2015
08:16 AM
|
0
|
6
|
5328
|
|
POST
|
Before my code runs, I would like to evaluate if a web service is running. How would I do that in JavaScript?
... View more
05-11-2015
08:02 AM
|
0
|
22
|
11401
|
|
POST
|
Kelly Hutchins I updated my code to the following. Your code was working but it was providing me with a unique list of values entered. I wanted the coded values that were available for entry for the web service: I was using this page: FeatureLayer | API Reference | ArcGIS API for JavaScript /* Query Begin */
var query = new esriQuery();
var queryBacking = new queryTask("http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0");
query.where = "1=1";
query.returnGeometry = false;
query.outFields = ["BACKING"];
query.returnDistinctValues = true;
queryBacking.execute(query, function (results) {
array.forEach(results.features.getDomain("BACKING"), function (feature) {
console.log(feature.getDomain["BACKING"]);
});
//for (var i = 0; i < results.CodedValues.length; i++) {
// console.log(results.CodedValues);
//}
});
/* Query End */ I'm getting this error: TypeError: results.features.getDomain is not a function {stack: (...), message: "results.features.getDomain is not a function"} message: "results.features.getDomain is not a function" stack: (...) get stack: function () { [native code] } set stack: function () { [native code] } __proto__: Error "TypeError: results.features.getDomain is not a function I also tried this, but it was undefined: console.log(app.signLayer.getDomain("BACKING").value); How should I use getDomain to get the list of values?
... View more
05-08-2015
01:50 PM
|
1
|
0
|
1700
|
|
POST
|
I ended up entering the following: /* Query Begin */
var query = new esriQuery("http://maps.decaturil.gov/arcgis/rest/services/test/StreetSignTest/FeatureServer/0");
query.where = "CONDITION_ IS NOT NULL";
query.returnGeometry = false;
query.outFields = ["CONDITION_"]
query.returnDistinctValues = true;
layer.queryFeatures(query, function (results) {
array.forEach(results.features, function (feature) {
console.log(feature.attributes["CONDITION_"]);
});
});
/* Query End */ I used esriQuery because dojo/query was in the require statement and already used a variable name query and here is the latest code: csergent45/streetSigns · GitHub
... View more
05-07-2015
02:14 PM
|
0
|
0
|
1700
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-26-2015 12:31 PM | |
| 1 | 06-24-2015 06:06 AM | |
| 1 | 07-15-2015 12:34 PM | |
| 1 | 05-21-2015 02:27 PM | |
| 1 | 05-19-2015 11:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|