|
POST
|
See List Comprehensions for more information on Mitch's answer.
... View more
06-30-2017
11:32 AM
|
0
|
0
|
4887
|
|
POST
|
I must admit my experience with ArcGIS Pro is limited. The pop-up feature is associated with the "Explore Tool". In the ArcGIS Pro Terminology Guide it states that the explore tool "contains functionality of" and is "similar to" the HTML Pop-Up tool. This suggests that the tool's underlying code may be very different from the ArcMap Desktop implementation. I could find not ArcGIS Pro ArcPy functions or classes that might interact with the pop-up. Perhaps there is a way with the https://community.esri.com/groups/arcgis-pro-sdk?sr=search&searchId=f1d108f6-584c-4720-a634-629f1f755a3e&searchIndex=1.
... View more
06-29-2017
01:09 PM
|
0
|
0
|
6909
|
|
POST
|
I share your frustration. For every feature I publish to AGOL, I have to go in and tweak the order for the symbol types of my feature layer. With a long list of types (in your case, it looks like 20) it is tedious to do this when you create your online map. To fix this, open your map in AGOL and click the edit button. You will see a list of your symbols for adding a new feature. Below this list of symbols, there is a "Manage" button; click it. To the right of each symbol there will be a small arrow which will allow you to move the symbol up or down in the list. Once the list is in the proper order save the changes, and then resave your map. When you reload the map in Collector, you should see the updated sorting. As fixing it in this manner is tedious when the list is long, I prefer to use the REST API and edit the JSON file. I have posted some Python code that I use in this post: Feature type sort order in REST API using Python. If you are not familiar with the REST API and editing the JSON file, work with a copy of your feature layer to get familiar with the process.
... View more
06-29-2017
10:15 AM
|
1
|
2
|
2368
|
|
POST
|
I couldn't find any ArcPy solutions. In the layer properties (on the HTML Popup tab), the option that I suggest you explore is "As a formatted page based on an XSL template". You can click on the "Load" button and load the default xsl template code to examine. Searching for "arcmap html popup xsl template" will lead to a couple of blog posts on the internet, including this Geonet topic: Custom XSL Formatting for HTML Popup in ArcMap. Additional information, but no details on XSL templates: Setting HTML pop-up properties for feature layers Using HTML pop-up windows for feature layers xsl #xsl_template
... View more
06-28-2017
10:33 AM
|
2
|
2
|
6909
|
|
POST
|
I don't have any experience using Python or the ArcGIS REST API with languages other than English. I suggest you start a new question and include an example of the problem. Edit: However, this link on StackOverflow looked interesting: decoding and encoding Hebrew string in Python
... View more
06-28-2017
09:24 AM
|
0
|
0
|
5035
|
|
POST
|
In addition to the PDF document Jake Skinner mentioned, you can look at Example 6 on this page. The Add to Definition is for adding new elements, such as a new field, to your feature service. Since you are modifying an existing field, you will want to use the Update Definition option for the field (or all fields) that use the domain. I suggest reading the JSON file, then select the field you wish to update and copy all of its information to a text file. Then add the item to the domain list where you want it displayed. Do not delete any items from the domain list as you will be updating the complete domain structure, and do not delete the field name (see Example 6). Before updating, I suggest using something like jsonlint.com to verify the formatting of your update. The endpoint will vary depending on whether you are using AGOL or your own server/portal. I agree with Jake that you would probably want to do this manually rather than write a script. Also, make a backup of your data before updating.
... View more
06-26-2017
10:17 AM
|
0
|
0
|
2494
|
|
POST
|
I have also been experimenting with the REST API ApplyEdits function. In my case, it is with AGOL, so you will need to modify the URLs in the example. Updates are sent as a list of dictionaries. Here's a code sample. import urllib, urllib2, json, sys, collections
# get a token - this is for AGOL, modify for portal/server
username = 'xxx'
password = 'yyy'
referer = "http://www.arcgis.com/"
tokenurl = "https://www.arcgis.com/sharing/rest/generateToken"
query_dict = { 'username': username, 'password': password, 'referer': referer }
query_string = urllib.urlencode(query_dict)
token = json.loads(urllib.urlopen(tokenurl + "?f=json", query_string).read())
if "token" not in token:
print(token['error'])
sys.exit(1)
# items to update, based on OBJECTID
# OBJECTID, POINT_X, POINT_Y, City
to_update = [
[ 11, -16683056.055, 8668941.2456, 'Anchorage' ],
[ 12, -16188891.9816, 8873309.4627000019, 'Glennallen' ],
[ 13, -16682516.0441, 8661113.2519000024, 'Anchorage' ]
]
updates = [] # this will be a list of dictionaries
for item in to_update
dict = {
'geometry' : {
'x' : item[1],
'y' : item[2]},
'attributes' : {
'OBJECTID' : item[0],
'City' : item[3]
}
}
updates.append(dict)
# modify URL for your needs
URL = "https://services2.arcgis.com/<directory>/arcgis/rest/services/<layer>/FeatureServer/0/applyEdits"
query_dict = {
"updates" : updates,
"f": "json",
"token": token['token']
}
jsonResponse = urllib.urlopen(URL, urllib.urlencode(query_dict))
response = json.loads(jsonResponse.read(),
object_pairs_hook=collections.OrderedDict)
print json.dumps(response, indent=4, sort_keys=False) # formatted json of response
If you do not need to update geometry, you can delete lines 28-30 and modify the to_update list and indexing. For additions, the query_dict would contain the "adds" parameter which is a list of dictionaries similar to the "updates" parameter. Features to be added should include the geometry. Additional documentation on ApplyEdits #arcgis online rest api
... View more
06-23-2017
11:30 AM
|
2
|
2
|
5035
|
|
POST
|
Since Collector checks date inputs for validity, I don't think you can go back to a null value. Your best option may be to enter a date like 1/1/1900 that would represent a null/invalid date. Collector will not allow entering a year before 1900.
... View more
06-21-2017
09:01 PM
|
0
|
0
|
1308
|
|
POST
|
Editing can also be restricted when you create a web map. There is the option to "Disable Editing", and in the "Configure Pop-up" you can disable editing by fields. You may wish to recheck these settings. From your attached picture, I would ask if the map and the editable layers have been shared with your editors. I didn't see any checks indicating it was being shared.
... View more
06-21-2017
12:06 PM
|
1
|
0
|
2799
|
|
POST
|
See Peter Nasuti's response at the bottom of this thread. If you have many entries, you may wish to develop a script to add points to your feature layer using the REST API.
... View more
06-17-2017
06:08 PM
|
2
|
0
|
825
|
|
POST
|
James, You should be able to use field calculator or something similar to replace spaces (ASCII 32) with non-breaking spaces (ASCII160). I was using a REST API query/update for my testing. Since the non-breaking space is a special character in html, it uses a special escape sequence. AGO will use this escape sequence, so you get non-breaking spaces. When you string several non-breaking spaces together, you will get the desired padding in the map's pop-ups. The web browser will not combine non-breaking spaces into a single space.
... View more
05-29-2017
11:35 PM
|
2
|
1
|
1126
|
|
POST
|
It might be an HTML thing where spaces get combined. Have you experimented with non-breaking spaces? UPDATE: I did some testing with AGO and replaced spaces with non-breaking spaces (ASCII 160) in a test field. AGO replaced them with the proper html escape codes when displaying them.
... View more
05-26-2017
03:33 PM
|
1
|
3
|
1126
|
|
POST
|
There are Python modules that work with SQLite files, so you shouldn't have to do install. See 11.13. sqlite3 — DB-API 2.0 interface for SQLite databases and SQLite Python (tutorial) for ideas
... View more
05-26-2017
09:47 AM
|
1
|
0
|
4293
|
|
POST
|
There is this in the REST documentation: Distance. "It reports the 2D Euclidean or geodesic distance between the two geometries."
... View more
05-25-2017
04:31 PM
|
0
|
0
|
399
|
|
POST
|
See this thread for ideas: Compare value from n and n+1 row in searchCursor
... View more
05-23-2017
05:31 PM
|
2
|
0
|
3718
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-27-2016 02:23 PM | |
| 1 | 09-09-2017 08:27 PM | |
| 2 | 08-20-2020 06:15 PM | |
| 1 | 10-21-2021 09:15 PM | |
| 1 | 07-19-2018 12:33 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-12-2026
07:13 PM
|