|
POST
|
I have an AGOL app that uses the district lookup widget to find school attendance areas. Users enter their address, and the relevant school boundaries and contact information are displayed. I'd like to create a Survey123 form where users can enter their name and address, the address is fed to the web map with the district lookup, and the result is returned to our ArcGIS Server as an address point with the relevant schools data. Is this possible?
... View more
01-07-2020
03:52 PM
|
0
|
5
|
1224
|
|
POST
|
No, ESRI told me the issue wasn't reproducible and closed the case (even though they initially told me it was a BUG . The workarounds mentioned above have worked for us so far.
... View more
01-06-2020
09:06 AM
|
0
|
0
|
1184
|
|
POST
|
Yes, I just saw that and implemented it. Both solutions work. Thanks!
... View more
12-19-2019
10:16 AM
|
0
|
0
|
522
|
|
POST
|
OK, thanks. I just started using this script as a module, and everything is working. But your solution is faster. Thanks!
... View more
12-19-2019
10:00 AM
|
0
|
0
|
1648
|
|
POST
|
I do. There aren't any data stores. I was just able to successfully overwrite my locator on the server using the script you linked to. So I'll just import that as a module in my script going forward. Thanks!
... View more
12-19-2019
09:59 AM
|
0
|
0
|
1655
|
|
POST
|
Shana, 1. Single locator created with Create Locator 2. Server 10.7.1. Not federated with Portal. 3. Yes 4. I'm not sure. Our server was set up and hosted by a 3rd Party and we are in the R&D stage. I will ask them about the data store. The server logs only display the errors I pasted above.
... View more
12-19-2019
09:09 AM
|
0
|
2
|
1655
|
|
POST
|
I can't publish locators at all from Python 3.6. It spits out vague errors. ERROR 001487: Failed to update the published service with the server-side data location. Please see the server's log for more details. ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). Failed. Failed to execute (Publish Service Definition). Failed. Failed to execute (UploadServiceDefinition). I have to publish manually from Pro, or from Python 2.7 (which keeps the suggestions off, so also isn't an option).
... View more
12-18-2019
12:18 PM
|
0
|
4
|
1655
|
|
POST
|
OK, but will I still need to use the script you linked to in order to overwrite locator services in Python? Or will overwrite_existing_service=True work in 2.5?
... View more
12-18-2019
09:39 AM
|
0
|
6
|
1655
|
|
POST
|
Thank you. I will try this out. That page says "We recommend using Pro 2.5 to overwrite your geocoding services. In Pro 2.5 you can overwrite services on both standalone server and on a federated Portal. This script is meant for users that are using an earlier version of Pro." I'm assuming this is directed at Beta testers. Is there a general release date for 2.5?
... View more
12-18-2019
08:52 AM
|
0
|
8
|
1652
|
|
POST
|
No, it just overwrites. If I try to run the same script in Python 3.6.8, it stops the locator on the server and then fails to upload the service definition. And I've found another issue. I create the locator in Pro/Python 3 using arcpy.geocoding.CreateLocator. This tool has no capabilities parameters (geocode, suggest, etc). I can't use the older tool arcpy.CreateAddressLocator_geocoding because suggestions are totally screwed up when the service is consumed in a web app. If I publish the locator straight from Pro (created with arcpy.geocoding.CreateLocator), everything works. If I create the locator in Python 3.6, and then publish it in 2.7, then suggestions are turned off. Turning them on and restarting the service has no effect. So no matter what, I have to physically publish the locator to the server or it won't work correctly. I need this process to be fully automated end to end, because the address points data I'm using is updated by the city on a bi-weekly basis.
... View more
12-17-2019
09:56 AM
|
0
|
10
|
3789
|
|
POST
|
I can overwrite Geocode services in Python 2.7, but not in Python 3.6 or in Pro.
... View more
12-17-2019
09:52 AM
|
0
|
12
|
3789
|
|
POST
|
I'm having trouble with this in Pro 2.4.2. overwrite_existing_service=True is not working inside Pro or Python 3.6.8. IDLE. Will this be addressed at Pro 2.5? I need to rebuild and overwrite a locator on our server once or twice a week.
... View more
12-16-2019
03:56 PM
|
0
|
0
|
3789
|
|
POST
|
The problem is with the argument overwrite_existing_service=True. If I remove this from the arcpy.CreateGeocodeSDDraft tool in Python 3.6, I get ERROR 001398: Service name 'COP_Master_Address_Locator' already exists. Failed to execute (UploadServiceDefinition).If I put it back in I get the aforementioned errors. If I run this script in Python 2.7 with overwrite_existing_service=True. the script says this is an unexpected argument. If I run it without that line the script will overwrite the previous locator on the server. So as it stands, I'll have to split this into two scripts between Python 2.7 and 3.6 to get it to work.
... View more
12-16-2019
03:17 PM
|
0
|
3
|
1648
|
|
POST
|
I have a script that creates two geolocators and publishes one of them to our standalone ArcGIS Server (10.7.1). When I run it in Python IDLE 3.6.8 it fails. When I run the exact same script in Python 2.7, it succeeds. I'm trying to get away from using 2.7, but I have a very similar issue with another important script that won't run in Pro or 3.6.8 due to a bug. Is anyone having trouble with Server publishing in Python 3.6.8? Here is the error that I get in the script and in the server logs. There is nothing specific in the server logs, just this: An error occurred ERROR 001487: Failed to update the published service with the server-side data location. Please see the server's log for more details. ERROR 001369: Failed to create the service. Failed to execute (Publish Service Definition). Failed. Failed to execute (Publish Service Definition). Failed. Failed to execute (UploadServiceDefinition). Here is the relevant snippet of the script: ##Publish locators to ArcGIS Server
locator_path = geocoding_dir + "COP_Master_Address_Locator.loc"
sddraft_file = geocoding_dir + "COP_MAF_locator.sddraft"
sd_file = geocoding_dir + "COP_MAF_locator.sd"
service_name = "COP_Master_Address_Locator_test"
summary = "Locator based on City Master Address Points"
tags = "Geolocator"
gis_server_connection_file = r"path\to\myconnection.ags"
# Create the sd draft file
analyze_messages = arcpy.CreateGeocodeSDDraft(locator_path, sddraft_file, service_name,
connection_file_path=gis_server_connection_file,
summary=summary, tags=tags, max_result_size=5,
max_batch_size=100000, suggested_batch_size=10000,
) ##overwrite_existing_service=True
# Stage and upload the service if the sddraft analysis did not contain errors
if analyze_messages['errors'] == {}:
try:
# Execute StageService to convert sddraft file to a service definition
# (sd) file
arcpy.server.StageService(sddraft_file, sd_file)
# Execute UploadServiceDefinition to publish the service definition
# file as a service
arcpy.server.UploadServiceDefinition(sd_file, gis_server_connection_file)
print("The geocode service was successfully published")
except arcpy.ExecuteError:
print("An error occurred")
print(arcpy.GetMessages(2))
else:
# If the sddraft analysis contained errors, display them
print("Error were returned when creating service definition draft")
pprint.pprint(analyze_messages['errors'], indent=2)
... View more
12-12-2019
08:57 AM
|
0
|
4
|
1866
|
|
POST
|
I have an app based on this JS template for hovering over features. I want the title of the dialog to come from an Arcade expression. I set up a plain text script: <script script type="text/plain" id="featureLabel">
var siteName = "$feature.SiteName";
var commonName = "$feature.Common_Name";
var label = When(IsEmpty(commonName),siteName,commonName);
return label;
</script> I want to assign the return value of this script to a variable. I tried to create a label class based on this example: var labelArcade = document.getElementById("featureLabel").text;
var label = new LabelClass({
labelExpressionInfo: {
expression: labelArcade
}
}); but var label just prints out [object Object]. Is there a way to just get the return value and assign that to a variable? I know how to do this in Python, but I'm going in circles on this one.
... View more
11-12-2019
01:39 PM
|
0
|
0
|
831
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 09-13-2024 10:43 AM | |
| 1 | 06-05-2025 01:26 PM | |
| 3 | 04-04-2025 10:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|