POST
|
Trying to use applyEdits to a hosted feature service in ArcGIS Online. I went to the query endpoint for the individual layer and queried out a feature which returned the features json for a single feature. "features" : [
{
"attributes" : {
"OBJECTID" : 62428,
"ADDID" : 63649,
"LONGITUDE" : "-20.39381937",
"LATITUDE" : "57.21860018",
"geoy" : 111.95,
"geox" : 170,
"ISSHELLADDRESS" : 0,
"SHELLID" : 0,
"DuplexID" : 63650,
"ADDRESSWITHUNIT" : "WhAt NOW MaN",
"ISSHFA" : 0
},
"geometry" :
{
"x" : 170.00002741069,
"y" : 111.9500441551
}
}
] I can take this, minus the "features" tag, and stick it in the updateFeatures for that individual feature layer and it works. Then I put the same content in a format for the applyEdits like below, and it fails. [
{
"id" : 0,
"adds" : [],
"updates": [
{
"geometry": {
"x" : 170.0069,
"y" : 11.9500
},
"attributes": {
"OBJECTID": 62428,
"ADDID": 63649,
"LONGITUDE": -80.39381937,
"LATITUDE": 27.21860018,
"geoy": 111.95,
"geox": 970,
"ISSHELLADDRESS": 0,
"SHELLID": 0,
"DuplexID": 63650,
"ADDRESSWITHUNIT": "It's Me I am the problem",
"ISSHFA": 0
}
}
],
"deletes": []
}
] I have tried multiple permutations with the larger format by removing the adds and deletes leaving just the updates and it's the same thing. I get back "code" : 400... Unable to apply edits. Other times it will show the Invalid JSON Primitive in "edit" I'm sure, like most times, I'm just missing something simple here. Thanks as always!
... View more
09-27-2023
12:15 PM
|
1
|
3
|
624
|
POST
|
Hi Jose, Realize this post is a long time ago. I'm trying to duplicate what I've done in a WPF app using Esri.ArcGISRuntime.WPF. I have an address layer that i need to symbolize by different values in multiple fields. I create queries and select by the desired fields. Then i add each point as a graphic with the desired symbology. I'm hoping that i can use Arcade to set symbols for addresses based on different fields. I'm going to try this but I thought I'd reach out to see if there is a better way.
... View more
09-21-2023
09:06 AM
|
0
|
0
|
567
|
POST
|
Good news, it's working. Bad news, I'm not sure what exactly happened. What I think happened is that there is some sort of disconnect between the code in the script window and the js file in the scripts folder. What I ended up doing was l tried to launch the script in an editor and then made changes. It just seemed to flip a switch or something and then the survey worked as expected.
... View more
09-10-2023
06:38 PM
|
0
|
0
|
256
|
POST
|
Hi, I've been using the Damage Assessment Solutions that includes Survey123 Connect XLS forms. Part of that is the JavaScript functions that should pull data from a feature service and use the data to populate a field in the survey. I keep getting a 400 error saying the URL is invalid. I've even created a URL that I know works and short circuited the JavaScript code and still get the invalid URL error. I've had this working in other surveys, just not the damage assessment. This is how the function is called from the XLS pulldata("@javascript","myJSFunctions.js","queryPolygon",string(${location}),"PARCELID",pulldata("@property","token"),true) Below is the code in the scripts folder. function queryPolygon(location,fields,token,debugmode){
if (location===""){
return (debugmode? "Location Object is empty":"");
}
var featureLayer = "https://services1.arcgis.com/**********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0";
var coordsArray = location.split(" ");
var coords = coordsArray[1] + "," + coordsArray[0]
var xmlhttp = new XMLHttpRequest();
var url = featureLayer + "/query?geometry=" + coords + "&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=" + fields + "&returnGeometry=false&returnCount=1&f=json"
if (token){
url = url + "&token=" + token;
}
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.status!==200){
return (debugmode? xmlhttp.status:"");
} else {
var responseJSON=JSON.parse(xmlhttp.responseText)
if (responseJSON.error){
return (debugmode? JSON.stringify(responseJSON.error):"");
} else {
if (responseJSON.features[0]){
return JSON.stringify(responseJSON.features[0]);
}
else{
return (debugmode? "No Features Found":"");
}
}
}
} This is the error that is stored in the JSON field. See Picture {"code":400,"message":"Invalid URL","details":["Invalid URL"]} Then I created a url that I know works and hardcoded it into the code and still get the same error. function queryPolygon(location,fields,token,debugmode){
if (location===""){
return (debugmode? "Location Object is empty":"");
}
var featureLayer = "https://services1.arcgis.com/***********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0";
var coordsArray = location.split(" ");
var coords = coordsArray[1] + "," + coordsArray[0]
var xmlhttp = new XMLHttpRequest();
var url = featureLayer + "/query?geometry=" + coords + "&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=" + fields + "&returnGeometry=false&returnCount=1&f=json"
//short circut url with known url that works when pasted into browser.
var url = "https://services1.arcgis.com/**********/arcgis/rest/services/RE_PARCELS_WEB/FeatureServer/0/query?geometry=-80.39273,27.21473&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelIntersects&outFields=PARCELID&returnGeometry=false&returnCount=1&f=json"
if (token){
url = url + "&token=" + token;
}
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.status!==200){
return (debugmode? xmlhttp.status:"");
} else {
var responseJSON=JSON.parse(xmlhttp.responseText)
if (responseJSON.error){
return (debugmode? JSON.stringify(responseJSON.error):"");
} else {
if (responseJSON.features[0]){
return JSON.stringify(responseJSON.features[0]);
}
else{
return (debugmode? "No Features Found":"");
}
}
}
} Any ideas would be greatly appreciated. As well on what the debug mode is and how would someone debug this code.
... View more
09-10-2023
07:57 AM
|
0
|
1
|
319
|
POST
|
I have a configuration we are working on. We've been running the configuration during development and testing with no issues. We've run the configuration for a few months with weekly updates. This morning, I was working with one of the users and upgraded their Config like we have in the past without issue. The config was successfully installed showing the "successful dialog". The config no longer starts ArcGISPro or does anything. Double-clicking on the desktop short cut does nothing. I've uninstalled Pro and reinstalled it. I did the whole delete folders and registry stuff I found below for a clean uninstall https://esriaustraliatechblog.wordpress.com/2023/01/18/performing-a-clean-uninstall-of-arcgis-pro/ I'm lost. I've run this update on my dev machine and my remote-vm with no issues. Other users have updated their computers with no issues. ESRI Tech is closed today. Does anyone have any experience with this? We are at ArcGIS Pro 2.9.5
... View more
06-19-2023
11:37 AM
|
0
|
2
|
489
|
POST
|
Just as I had finished doing a query where 1=1 and parsing out the fields from that JSON, I see your response. It worked as expected. This is the third time I got stuck trying to move from AGS 10.71 to AGOL. It just frustrated me that the /fields works in AGS and not AGOL. Thank you for the timely response. Now I can call it a day and go play some golf!
... View more
03-31-2023
10:07 AM
|
0
|
0
|
851
|
POST
|
I'm trying to get a simple list of fields from an ArcGIS Online Hosted feature service. When I paste the local service url into a web browser, I get back a JSON string that includes the fields. https://***.*******.com/intgis3/rest/services/FCC/fcc_zones/MapServer/0/fields?f=json when I tried the same thing with the AGOL hosted FeatureService, and included a token I got back this error {"error":{"code":400,"message":"Error: Feature (ID: fields) not found","details":["Unable to retrieve feature."]}} I tried with POST and a simple webClient.DownloadString(). Once again that worked for my local service but not the AGOL service. how can I get just a list of fields of hosted feature service? I'm going to do a /query with fields="*" and manipulate that. But it sure would be easier if this worked in AGOL my local ArcGIS Server is 10.71
... View more
03-31-2023
09:23 AM
|
0
|
2
|
865
|
POST
|
When I looked the labels were already there in the visualization arena as the default. All new maps show the labeled data. I will keep looking for a solution from the vendor. QAlert uses the symbology from the layer. It works fine from a MapService, just not the Hosted Feature Service. Thanks
... View more
03-06-2023
12:04 PM
|
0
|
0
|
634
|
POST
|
+1 for the Fry pic. Thank you for the suggestions. I'll try them out.
... View more
03-04-2023
05:14 AM
|
0
|
0
|
652
|
POST
|
Hi, I have a map service on our ArcGIS Server that is used by another non gis application QAlert. The map service published from ArcMap has labels. When we switched the data to a FeatureService in ArcGIS Online, the labels no longer show in QAlert. I understand the difference between the FeatureService in AGOL and the MapService on my ArcGIS Server. I'm just hoping that there might be a workaround for this that I've yet to stumble across. Thanks for any comments.
... View more
03-03-2023
10:23 AM
|
0
|
3
|
710
|
POST
|
I ended up figuring out that I was trying to use a button for the select by rectangle instead of a tool. So a big thanks for that because I was able to get what i wanted. I couldn't get the tool pallet to work. Kept getting error of "the id attribute is not declared" and there were problems with the other tags in your line 7 defining the palette. And at the end of line 7 there was "the element cannot contain white space. Content model is empty". And another error on your line 8 that said "the element cannot contain child element because the parent element's model is empty". I'll keep plugging on that as i can use palette in other apps. <modules>
<insertModule id="PamConfig_Module" className="Module1" autoLoad="false" caption="Module1">
<tabs>
<tab id="PamConfig_Tab1" caption="PAM" keytip="t1">
<group refID="PamConfig_Group1" />
<group refID = "PAMConfig_Editing_selectionGroup"/>
<!--<group refID="esri_editing_selectionGroup" />-->
</tab>
</tabs>
<groups>
<group id="PamConfig_Group1" caption="Connect..." appearsOnAddInTab="false" keytip="g1">
<button refID="PamConfig_PAMDP_ShowButton" size="large" />
</group>
<group id ="PAMConfig_Editing_selectionGroup" caption="Selection" appearsOnAddInTab ="false" keytip="g2">
<tool refID="esri_mapping_selectByRectangleTool" size="middle" />
<tool refID="esri_mapping_selectByPolygonTool" size="middle" />
<button refID="esri_mapping_clearSelectionButton" size="middle" />
</group>
</groups>
<controls>
<!-- add your controls here -->
<button id="PamConfig_PAMDP_ShowButton" caption="Show PAMDP" className="PAMDP_ShowButton" loadOnClick="true" smallImage="Images\PAMPRO16.png" largeImage="Images\PAMPRO32.png" keytip="b1">
<tooltip heading="Show Dockpane">Show Dockpane<disabledText /></tooltip>
</button>
</controls>
<dockPanes>
<dockPane id="PamConfig_PAMDP" caption="PAMDP2.5" className="PAMDPViewModel" dock="group" dockWith="esri_core_projectDockPane">
<content className="PAMDPView" />
</dockPane>
</dockPanes>
</insertModule>
</modules>
... View more
12-16-2022
02:53 PM
|
0
|
0
|
520
|
POST
|
I am making a Configuration Add-in to remove ribbons and other tools and provide only the tools needed by the user. All the add-in interaction is done with buttons and controls on a dock pane. The user will have to use the selection tool to select parcels to create project boundary polygons. I know I could make buttons to select/clear and put them on my dock pane but since I'm in a configuration project I'd figure I could leave the Select and Clear buttons on the ribbon. In the configure database in the override OnUpdateDatabase, I remove everything but my Add-in group. Then, in the DAML, I add the esri_editing_selectionGroup group in the <tabs> area. This works and shows just the Selection group in the ribbon (ribbon.png). I don't want the Attributes button to show. Is there anyway I can remove the attribute button? I thought, perhaps I could just add those 2 buttons to my add-in group. I tried just adding the selection tool but that is not working. See DAML below. I tried "refID" like what worked for the group and just the "id" like my button and neither worked. Finally, i could forget about all this and tell the user to use the right-click context menu on the map to clear and select. But I would like to know this for future efforts. <modules>
<insertModule id="PamConfig_Module" className="Module1" autoLoad="false" caption="Module1">
<!-- uncomment to have the control hosted on a separate tab-->
<tabs>
<tab id="PamConfig_Tab1" caption="PAM">
<group refID="PamConfig_Group1" />
<group refID="esri_editing_selectionGroup" />
</tab>
</tabs>
<groups>
<group id="PamConfig_Group1" caption="Connect..." appearsOnAddInTab="false">
<button refID="PamConfig_PAMDP_ShowButton" size="large" />
</group>
</groups>
<controls>
<!-- add your controls here -->
<button id="PamConfig_PAMDP_ShowButton" caption="Show PAMDP" className="PAMDP_ShowButton" loadOnClick="true" smallImage="Images/PAMPRO16.png" largeImage="Images/PAMPRO32.png">
<tooltip heading="Show Dockpane">Show Dockpane<disabledText /></tooltip>
</button>
<!--<button refID="esri_mapping_SelectByRectangeleTool"/>-->
</controls>
<dockPanes>
<dockPane id="PamConfig_PAMDP" caption="PAMDP2.5" className="PAMDPViewModel" dock="group" dockWith="esri_core_projectDockPane">
<content className="PAMDPView" />
</dockPane>
</dockPanes>
</insertModule>
</modules>
... View more
12-15-2022
12:39 PM
|
0
|
2
|
596
|
POST
|
using Pro 2.9 I'm working on moving cad data to GIS for use in Lucity. For a good deal of the feature types, their cad uses multiple lines to represent a single feature. Like an irrigation valve or a fiber pull box. I'm looking for a way to create a single point from 35 line segments that are near each other. See image. I've tried selecting the longest segments and making points from that but the lengths are inconsistent and are digitized in different directions so there is no consistent end point or center point and points would have to be moved. With multiple layers and thousands of features it's not really feasible. Is there anyway to accomplish this task?
... View more
10-07-2022
08:25 AM
|
0
|
2
|
471
|
POST
|
have an arcgis online web app configured to a web map. The web app uses the Near Me widget to convey the information. This widget draws from the pop up configuration in the web map. If I take this app off of AGOL and into web app builder, would i be able to short circuit the map click and not show the popup? have experience with other web app builder apps and custom widget development. not looking for code but a short yes or no and where about i might find or create such functionality. Thank you
... View more
08-04-2022
07:44 PM
|
0
|
0
|
161
|
POST
|
To make the Extent Indicator map move. You have to set the Constraint in the Display Options on the Extent Indicator Map.
... View more
07-14-2022
02:01 PM
|
4
|
0
|
704
|
Title | Kudos | Posted |
---|---|---|
2 | a month ago | |
1 | 09-27-2023 12:15 PM | |
1 | 04-03-2019 10:27 AM | |
1 | 12-23-2021 08:08 AM | |
4 | 07-14-2022 02:01 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|