|
POST
|
Has ability to pre-populate answers in a Survey been extended to work for answers in a repeat/related table? Last I heard (2018) this is cannot be done. arcgis-survey123://?itemID=myItemId&field:repeatFieldName={FeatLayerField}
... View more
05-21-2019
09:05 AM
|
0
|
1
|
905
|
|
POST
|
Do you have a C# example of how to add fields for an SOI? I have a JArray of values that I'd like to add/enrich to existing map service output.
... View more
05-16-2019
01:39 PM
|
0
|
1
|
1705
|
|
POST
|
I started with an SOI project and attempting to create an interceptor that will take the contents of a map service (layer 1) and kludge some new attributes from some other JSON I have pulled in another request. Which sample would be closest to what I'd like to attempt? This YouTube Video is doing what I'd like but is in Java and not C# and I'm having difficulty understanding. I have a simple SOI.sln setup and just starting to try and fill in the correct areas. public byte[] HandleRESTRequest(string Capabilities, string resourceName, string operationName,
string operationInput, string outputFormat, string requestProperties, out string responseProperties)
{
responseProperties = null;
_serverLog.LogMessage(ServerLogger.msgType.infoStandard, _soiName + ".HandleRESTRequest()",
200, "Request received in Sample Object Interceptor for handleRESTRequest");
/*
* Add code to manipulate REST requests here
* https://somearcgisserver.com/somesite/rest/services/test/ServiceNameHere/MapServer/1
* https://some3rdpartyapi.com/v1/realtime
*/
// Find the correct delegate to forward the request too
IRESTRequestHandler restRequestHandler = FindRequestHandlerDelegate<IRESTRequestHandler>();
if (restRequestHandler == null)
return null;
var response = restRequestHandler.HandleRESTRequest(
Capabilities, resourceName, operationName, operationInput,
outputFormat, requestProperties, out responseProperties);
//I think I need to add something here to grab the existing JSON of the mapservice and then kludge the desired attributes into it
if (operationName.Equals("query") && resourceName.Equals("layers/1"))
{
//access the JSON of the map service here
//access the JSON of the 3rd party rest service result
//kludge the two together on the common attribute they share
}
return response;
//return restRequestHandler.HandleRESTRequest(
// Capabilities, resourceName, operationName, operationInput,
// outputFormat, requestProperties, out responseProperties);
}
... View more
05-15-2019
01:44 PM
|
0
|
2
|
1368
|
|
POST
|
Update: I went thru the full workflow starting with an existing Survey with the desired basemaps published with it. Then I updated the basemap and ran my scripting component that builds the new .tpk (with the changed basemap) and republishes the same survey item. Confirmed: that updated survey contains the expected basemap with changes I made to it. This was confirmed by using Connect to download that updated survey and then I navigated to the media folder where that updated .tpk is found and added it to ArcMap to compare against the original feature class that participates in the tpk --- the changes are seen! Also confirmed: I deleted the existing survey off of the mobile device(s), re-downloaded the updated survey, opened the map component and do not see the changes made to the basemap like I see in the local copy that was downloaded with Connect! Also Also confirmed: Completely uninstalling Survey123 from the device, re-installing from the app store and downloading the updated survey item will then display the most current/updated basemap!
... View more
05-10-2019
12:50 PM
|
0
|
0
|
774
|
|
POST
|
Thank you for the response James, I'll look into that. Of note, using https://ago-assistant.esri.com/ I can see that the modified date of the form item is being updated when the scripting finishes.
... View more
05-08-2019
01:16 PM
|
0
|
9
|
2714
|
|
POST
|
We've impmented this to automate the updating of basemaps and republishing of a survey: https://community.esri.com/groups/survey123/blog/2017/12/08/an-alternative-way-to-update-the-media-folder-of-a-survey123-form-item We're having an issue with the tpk basemaps added to the media folder and then republishing the Survey. The entire workflow to build new tpk's, download the existing survey, build a new zip and upload to the form item all works correctly and we can see the form is updated just fine, however the basemaps do not update on the device(s). Even after deleting and re-downloading the survey item, we don't see updates to the basemaps. The only way we actually see the updates to the basemaps is when the Surve123 app is completely uninstalled and re-installed from the app store. Only then after downloading the survey item again will the basemap changes appear. It's very similar to a browser caching a previous session. Is there something I'm missing or can look to do? iOS v12.1.4
... View more
05-07-2019
07:18 AM
|
0
|
12
|
3737
|
|
POST
|
Decision was to revert back and consolidate into a single webmap viewer with configured search layers. We're giving up some additional control but benefits of the webmap outweigh having so many AGOL items to manage.
... View more
04-22-2019
07:24 AM
|
0
|
0
|
2021
|
|
POST
|
Update: I implemented what is described in the original post for now and will just be aware of any concurrency problems associated with writing to the .txt file.
... View more
04-22-2019
07:16 AM
|
0
|
0
|
755
|
|
POST
|
It looks like the payload didn't contain "[" "]" brackets around the features parameter. I made that into a variable instead of setting directly from json.dumps(feat) and it seemed to work. paramFeatures = json.dumps(feat)
params = urllib.urlencode({'f': 'json',
'features': paramFeatures,
'token': genTokenAGS()})
... View more
04-15-2019
10:51 AM
|
0
|
0
|
3615
|
|
POST
|
I'm attempting to addFeatures in a .py script to an ArcGIS Server feature service. Can anyone spot an issue with the payload? My source code: queryURL_dalId = DALfs + "/addFeatures"
params = urllib.urlencode({'f': 'json',
'features': json.dumps(feat),
'token': genTokenAGS()})
req = urllib2.Request(queryURL_dalId, params)
response = urllib2.urlopen(req)
jsonResultApp = json.load(response)
print jsonResultApp
#the result print is:
#{u'error': {u'message': u'Unable to complete operation.', u'code': 500, u'details': [u'Parser error: Some parameters could not be recognized.']}} The params "feature" attribute looks like this: {
"geometry": {
"rings": [
[
[
-8916035.78019179,
3084661.19599559
],
[
-8915988.0070495,
3085052.93576556
],
[
-8915529.38488079,
3085148.48205013
],
[
-8915424.28396684,
3084804.51542474
],
[
-8914889.22476772,
3084833.17930828
],
[
-8914593.03128233,
3084336.33862437
],
[
-8913924.20728573,
3084365.0025102
],
[
-8913859.51668594,
3083941.53976998
],
[
-8914444.27714894,
3083843.30241113
],
[
-8915008.00023389,
3083843.30241113
],
[
-8916035.78019179,
3084661.19599559
]
]
]
},
"attributes": {
"activityLogId": "DAL-999",
"scheduleId": "SCH-9",
"agency": "blah"
}
} Thanks for looking!
... View more
04-12-2019
02:08 PM
|
0
|
1
|
4145
|
|
POST
|
This error is due to Background 64-bit Geoprocessing. See THIS thread. To fix I simply forced the script to run C:\Python27\ArcGIS10.4\python.exe, which I put into a .cmd text file. This works perfect since I planned to run this from the Task Scheduler anyway!
... View more
04-12-2019
07:00 AM
|
2
|
0
|
1733
|
|
POST
|
Odd that the script fails when running via pyScripter but completes fine when executed from the ArcGIS toolbox tool. I literally copied/pasted the .py snippet from the Geoprocessing results window into a new .py script file. Thanks!
... View more
04-12-2019
06:02 AM
|
0
|
0
|
1733
|
|
POST
|
Pretty straight forward script to build a .tpk from an existing .mxd that contains the desired feature class. In fact, when the ArcToolbox is run on the same .mxd it completes as expected. When I copy and paste the script from the Geoprocessing results window into a standalone .py script, it fails with the below error: arcpy.CreateMapTilePackage_management(in_map="H:/directory/somename.mxd", service_type="ONLINE", output_file="H:/directory/somename.tpk", format_type="PNG", level_of_detail="10", service_file="", summary="", tags="", extent="DEFAULT")
Traceback (most recent call last): File "<string>", line 73, in execInThread File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\netref.py", line 196, in __call__ File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\netref.py", line 71, in syncreq File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py", line 431, in sync_request File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py", line 379, in serve File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\protocol.py", line 337, in _recv File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\channel.py", line 50, in recv File "C:\Program Files\PyScripter\Lib\rpyc.zip\rpyc\core\stream.py", line 166, in read EOFError: [Errno 10054] An existing connection was forcibly closed by the remote host
... View more
04-09-2019
12:39 PM
|
0
|
3
|
1962
|
|
POST
|
Robert has answered this in another post HERE. yourFeatureLayer.setMaxAllowableOffset(0);
yourFeatureLayer.setAutoGeneralize(false);
... View more
04-08-2019
06:44 AM
|
0
|
0
|
992
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2020 10:47 AM | |
| 1 | 10-25-2022 11:46 AM | |
| 1 | 08-08-2022 01:40 PM | |
| 1 | 02-15-2019 08:21 AM | |
| 2 | 08-14-2023 07:14 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2025
02:28 PM
|