|
POST
|
Just as a side note, if you want it to be a json you can replace the 'f=html' at the end of the url with 'f=pjson' like so: https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2/query?where=&text=&objectIds=1&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&having=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentOnly=false&datumTransformation=¶meterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=pjson Here is a sample I created that queries the rest endpoint in JavaScript: https://codepen.io/benesri/pen/oNNgGXP I add it to a map, but you can just as easily access the json object instead.
... View more
10-15-2019
08:07 AM
|
1
|
4
|
2323
|
|
POST
|
Hi Sergio, Point Interpolation can be done from the REST endpoint. You can replace the geoprocessing service in the example you found with the Point Interpolation one. Point Interpolation costs 1 credit ($0.10 USD) per 1000 features. In terms of points from a GeoJSON, I created a sample a while ago that may help.
... View more
10-14-2019
09:16 AM
|
1
|
1
|
1473
|
|
POST
|
If the geographies have a unique id you could create a dict to use when assigning colors const dict = {
id1: "color1",
id2: "color2",
...
};
... View more
10-14-2019
08:55 AM
|
0
|
0
|
623
|
|
POST
|
I'd suggest opening a case with Esri Technical Support so an Analyst can take a closer look.
... View more
10-02-2019
02:21 PM
|
0
|
0
|
2195
|
|
POST
|
Are there any errors in the console or network traffic in the browser's dev tools?
... View more
10-02-2019
12:16 PM
|
0
|
0
|
2195
|
|
POST
|
In your browser, when you go to: https://MY_PROXY_DOMAIN/EsriResourceProxy/proxy.ashx?ping You should get an output like: { "Proxy Version": "1.1.2", "Configuration File": "OK", "Log File": "Not Exist/Readable"} If your proxy is set up correctly. Can you check that?
... View more
10-02-2019
11:59 AM
|
0
|
2
|
2195
|
|
POST
|
Try adding it as a proxy rule. In the JavaScript app: urlUtils.addProxyRule({
urlPrefix: "https://MY_PORTAL_DOMAIN/portal",
proxyUrl: "https://MY_PROXY_DOMAIN/EsriResourceProxy/proxy.ashx"
}); In proxy.config: <serverUrl url="https://MY_PORTAL_DOMAIN/portal"
username="USERNAME"
password="PASSWORD"
matchAll="true"/> Relevant documentation: Setting up proxy overview addProxyRule
... View more
10-02-2019
11:46 AM
|
1
|
4
|
2195
|
|
POST
|
The relevant code being view.whenLayerView(featureLayer).then(function(layerView) {
layerView.watch("updating", function(value) {
if (!value) {
// wait for the layer view to finish updating
// query all the features available for drawing.
layerView
.queryFeatures({
geometry: view.extent,
returnGeometry: true
})
.then(function(results) {
// Get count of features
console.log(results.features.length)
})
.catch(function(error) {
console.error("query failed: ", error);
});
}
});
});
... View more
09-30-2019
02:57 PM
|
0
|
0
|
4855
|
|
POST
|
Make sure the hosted layer has editing enabled. 1) Go to the hosted layer 2) Settings tab (far right) 3) Feature Layer (hosted) on the left 4 Make sure the editing options are what you want
... View more
09-30-2019
09:32 AM
|
0
|
2
|
879
|
|
POST
|
Where are you hosting the app to be accessed on other machines? If you are copying the files themselves you also need to copy over the picture being used for the marker. Are you getting an errors in the console?
... View more
09-26-2019
08:13 AM
|
0
|
1
|
920
|
|
POST
|
This is usually an async issue, where the object is not populating before you console.log These may be the key lines from the sample you are working from map.on("layers-add-result", function(results) {
requestPhotos();
}); If that's not it look for some other watcher to handle the event for when the layer adds/loads
... View more
09-24-2019
12:29 PM
|
1
|
1
|
2452
|
|
POST
|
Hi Jub, I am unaware of a built in way to allow the user to add items from Portal. However, using the service url you can try to build it yourself. I can create a sample for this Edit: Here is the sample: https://codepen.io/benesri/pen/QWLYRoK?editors=1000 Note that there is no error handling and it assumes everything is a FeatureLayer, but it's something that you can build on
... View more
09-24-2019
09:26 AM
|
1
|
1
|
2728
|
|
POST
|
This is a sample in 3x In this thread Munachiso was able to convert the sample to 4x Here is the github for the 4x version You do need AGOL or Portal for this to work. Also you may need the resource proxy to remedy any CORS errors you may get. This sample is based on the 3.x, so a lot of the code from that sample is the same with some changes for 4.x. - Munachiso
... View more
09-23-2019
03:42 PM
|
1
|
3
|
2728
|
|
POST
|
The snippet below is from this sample // Watch view's stationary property for becoming true.
watchUtils.whenTrue(view, "stationary", function() {
// Get the new center of the view only when view is stationary.
if (view.center) {
var info =
"<br> <span> the view center changed. </span> x: " +
view.center.x.toFixed(2) +
" y: " +
view.center.y.toFixed(2);
displayMessage(info);
}
// Get the new extent of the view only when view is stationary.
if (view.extent) {
var info =
"<br> <span> the view extent changed: </span>" +
"<br> xmin:" +
view.extent.xmin.toFixed(2) +
" xmax: " +
view.extent.xmax.toFixed(2) +
"<br> ymin:" +
view.extent.ymin.toFixed(2) +
" ymax: " +
view.extent.ymax.toFixed(2);
displayMessage(info);
}
});
... View more
09-23-2019
12:56 PM
|
2
|
1
|
4855
|
|
POST
|
Have you looked into the Esri resource proxy? It does all of the authenticating for you, and works for your use case (accessing secured resources without logging in)
... View more
09-20-2019
11:13 AM
|
1
|
0
|
6016
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-22-2021 10:22 AM | |
| 1 | 01-19-2023 11:10 AM | |
| 1 | 08-30-2022 04:09 PM | |
| 2 | 08-22-2022 03:20 PM | |
| 1 | 08-22-2022 03:57 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-03-2023
03:22 AM
|