POST
|
Thanks. I'll check that out. There is a 'preserve_layer_ids' property in the create_view method, but I haven't gotten it to accept True create_view(name = viewName, preserve_layer_ids = True) throws an error. Replace True with False and it works but that's the default and not what I want for this.
... View more
06-13-2024
03:49 AM
|
0
|
0
|
364
|
POST
|
The 'workaround' offered by the bug-description, is to create the view manually in AGOL.
... View more
06-10-2024
05:12 PM
|
0
|
0
|
407
|
POST
|
It's actually a bug, but I can't scare it up at the moment. The status of the bug is 'As-Designed' which I do not understand.
... View more
06-10-2024
05:12 PM
|
0
|
1
|
407
|
POST
|
Thank you, Just did. https://github.com/Esri/arcgis-python-api/issues/1841
... View more
06-09-2024
02:29 PM
|
0
|
0
|
378
|
POST
|
Views created programmatically from services that have non-sequential layer ids are unusable. I created a view from this code: source_search = gis.content.search("test_20240608_unique_ids_assigned_all_around")[0] source_flc = FeatureLayerCollection.fromitem(source_search) new_view = source_flc.manager.create_view(name="unid_all_around_view") Source-Service layer ids: View layer ids: When the view is opened in the map viewer, the layers are messed up. The Route line layer has become a point layer and one of the point layers (the one with the very long name!) has become a line. A complete mess. This happens consistently, on more than one platform. It does not happen when views are created manually. Also, create_view works fine when the layers are ordered sequentially 0 to N, top-down.
... View more
06-09-2024
06:40 AM
|
0
|
4
|
507
|
POST
|
I am having a similar problem. If the layer ids in a service are not sequentially ordered, create_view will create a view with messed up layer order. https://community.esri.com/t5/arcgis-api-for-python-questions/create-view-does-not-work-if-layer-ids-are-not/m-p/1487873
... View more
06-09-2024
06:27 AM
|
1
|
0
|
182
|
POST
|
If the uniques in the layer of a service are not arranged from 0 to N, top to bottom, the result of 'create_view' will be unusable. I ran this code on a service with non-sequential ids: source_search = gis.content.search("test_20240608_unique_ids_assigned_all_around")[0] source_flc = FeatureLayerCollection.fromitem(source_search) new_view = source_flc.manager.create_view(name="unid_all_around_view") Layer order in service: Layer order in view created by above script: The view, when opened in the map viewer. The route, which is a line, has become a point layer. Activity 11016565550 GPXtoFeatures has become a line feature. A complete mess. This only happens with 'create_view' in ArcGIS API for Python (in a notebook). If I make the view manually, this does not happen. create_view DOES work correctly when the order of layer ids in the service is 0,1,2... top-down. Has anyone else experienced this? Is it a bug? I have reproduced this on several platforms. ArcGIS API for Python cannot make a view from a service with non-sequential layer ids.
... View more
06-09-2024
06:12 AM
|
0
|
2
|
453
|
POST
|
I have created a hub site, with just a few products I have created for recreational purposes. I (and anyone else I send links to) can access the links in these products, but they never show up on Google searches, not at all, not even at the very the end of the list. They are shared publicly, and I have given them tags. I have entered the tags in search engines to no avail. Is there some really obvious thing I'm missing to make content discoverable? Thank you, Randy McGregor
... View more
10-11-2021
10:43 AM
|
0
|
1
|
588
|
POST
|
Thanks. That's almost it. You have to select the text element in the layout, then select 'enable leader.' It is not automatic like it was in ArcMap. ArcGIS Pro has nice functionality, but it is not as user-friendly as ArcMap.
... View more
06-29-2021
06:13 PM
|
3
|
0
|
1480
|
POST
|
I have selected a balloon callout but the leading pointer won't materialize. How do I get it to show up? Thank you, Randy McGregor
... View more
06-27-2021
05:40 PM
|
0
|
2
|
1569
|
POST
|
I am trying list services from an ArcGIS Server site with arcgis api for python and all capabilities for listing server information seem to be designed to go through Portals. Is it possible to access an arcgis server site that is federated with an AGOL list or that is not federated (standalone)? Thank you, Randy McGregor
... View more
03-30-2021
05:47 AM
|
0
|
1
|
904
|
POST
|
Thanks David, I'll give that a try. Appreciate it. Randy
... View more
12-01-2020
05:25 PM
|
0
|
0
|
1145
|
POST
|
I have a simple python script that updates a scene bookmark for each of 50 map series map bookmarks and exports a layout. I run it for each of 50 map series bookmarks. It works fine, but some of the outputs are missing features and I need to redo them. I'm guessing it's going "too fast" and some of the layouts are exporting before the layout has fully drawn all the features. Is there a way to slow it down, or tell it to wait till everything's drawn fully before it exports? Thank you, Randy McGregor #
# Export map series and update scene bookmarks.
#
import arcpy, os, sys, time
out_folder = arcpy.GetParameterAsText(0)
p = arcpy.mp.ArcGISProject("CURRENT")
l = p.listLayouts()[0]
#
# Get the scene:
#
for m in p.listMaps():
if m.mapType == 'SCENE':
s = m
break
#
# Get the scene frame:
#
for mf in l.listElements('MAPFRAME_ELEMENT'):
if mf.camera.mode != "MAP":
sf = mf
break
#
# Run the map series:
#
if not l.mapSeries is None:
ms = l.mapSeries
if ms.enabled:
for pageNum in range(1, ms.pageCount + 1):
ms.currentPageNumber = pageNum
time.sleep(5)
pageName = ms.pageRow.STATE_NAME
arcpy.AddMessage("> "+pageName+"...")
arcpy.AddMessage("> "+str(pageNum))
#
# Find the corresponding scene bookmark:
#
for bk in s.listBookmarks():
if bk.name == pageName:
arcpy.AddMessage("> Zooming to bookmark: "+bk.name+"...")
sf.zoomToBookmark(bk)
arcpy.AddMessage(out_folder+"\\Election_2020_"+pageName+".pdf")
l.exportToPDF(out_folder+"\\Election_2020_"+pageName+".pdf")
... View more
11-26-2020
09:36 AM
|
0
|
2
|
1187
|
POST
|
The inset map option scene app seems very handy, but is there a way to set the initial extent? I can't tell how the inset map is deciding on the initial view, but it's not the web map initial view.
... View more
11-21-2020
09:26 AM
|
0
|
0
|
492
|
POST
|
Thanks, but I am not familiar with Javascript. I'm guessing there's no "out-of-the-box" way to do this?
... View more
11-21-2020
05:55 AM
|
1
|
1
|
1209
|
Title | Kudos | Posted |
---|---|---|
1 | 06-09-2024 06:27 AM | |
1 | 11-21-2020 05:55 AM | |
2 | 11-02-2018 06:16 PM | |
3 | 06-29-2021 06:13 PM | |
2 | 11-18-2020 05:26 PM |
Online Status |
Offline
|
Date Last Visited |
11-03-2024
09:02 AM
|