|
POST
|
Well, I do want the legend! Otherwise, that would suffice. Is this more of a function of the print template rather than configurable from the widget side?
... View more
07-09-2020
09:47 AM
|
0
|
0
|
3832
|
|
POST
|
Granted, we're always taught not to be print maps without scale bars, north arrow... I know, I know. But I have an app in WAB that does not include a scale bar. It's more of a schematic than a true map. So when I print it, the Print widget will include a scale bar in the PDF. Any way to suppress that? Where would I tweak that in the widget?
... View more
07-09-2020
09:19 AM
|
0
|
10
|
4471
|
|
POST
|
When using a derivative of the template map service publishing examples given in many places throughout ESRI documentation, I have the following working (I've stripped this down significantly)... # set up a number of parameter for SD Draft generation
# shortened for illustration
sharing_draft = m.getWebLayerSharingDraft("FEDERATED_SERVER", "MAP_IMAGE", service)
sharing_draft.federatedServerUrl = <federatedServerUrl>
...
# Create SD Draft files
sharing_draft.exportToSDDraft(sddraft_output_filename)
..
arcpy.StageService_server(sddraft_output_filename, sd_output_filename)
...
# set up a number of parameter for SD Draft
# shortened for illustration
inSdFile = sd_output_filename
inServer = <serverUrl>
inServiceName = <service name>
...
arcpy.UploadServiceDefinition_server(inSdFile, inServer, inServiceName, ...) What exactly is the difference - if any - between what I am referring to here as >federatedServerUrl. and <serverUrl>? And what exactly is the format of the URL expected here? I have it working in one environment and am using the exact same string (URL) for both variables. In another environment, the same code fails with ... ExecuteError: ERROR 999999: Something unexpected caused the tool to fail.
Please refer to the error help for potential solutions, or contact Esri
Technical Support http://esriurl.com/support.
Failed to execute (StageService). The only difference is that I'm using a different URL but the same one in both places. It's a valid URL that mimics the first environment's URL and includes the webadaptor name. It successfully created the SD Draft file. So the URL seems to work fine for that steps. Very frustrating. I have used this a bunch of times in both environments and now it fails.
... View more
07-09-2020
07:32 AM
|
0
|
0
|
1001
|
|
POST
|
Agree with you, some of the ESRI examples look real straight forward until you try to solve a real world problem. For me it came down creating a GP Service in Python that does what I need with a map saved in APRX project. You can work in Pro or Python until you have that right. Once that's done, you call that services using...Geoprocessor. Once you have an instance of a geoprocessing service to call and a printTask in Javascript, you can do something like: var webMapAsJSON = printTask._getPrintDefinition(currentMap, params); var webMapAsJSONasString = JSON.stringify(webMapAsJSON); var file; var gpParams = {"Web_Map_as_JSON" : webMapAsJSONasString,"PDFOutputFile" : file}; gp.submitJob(gpParams, this.completeCallback, this.statusCallback); Let me know if that helps.
... View more
07-06-2020
06:26 AM
|
0
|
1
|
3131
|
|
POST
|
Thanks, Derek... hadn't really given that any thought. Will try it now. Since I don't have much need for a basemap with this app anyway, this could be work out to my advantage. Thanks for the suggestion.
... View more
06-29-2020
06:10 AM
|
0
|
0
|
5423
|
|
POST
|
Sorry if this question's title isn't clear. I feel a bit out of my depth on this one. Got to this point via a somewhat convoluted route... Background: Trying to migrate old AGS map services to Portal. These maps appear to be derived from CAD drawings and features were reprojected to essentially line up with the page or window of the GIS application. So what you see in the map does not match the real world alignment of features. The originals are in MXD form and there is no rotation in data frame. The original map services apparently accepted this transformation and showed the features in the desired "format". When I import MXD's into ArcGIS Pro (2.5), everything looks good. When I publish to Portal, everything still looks good. Map services show the feature transformed as desired. But when I create a web map from these web layers in Portal, everything apparently gets forced into the basemap's projection and all the sudden everything appears rotated back to its real world alignment. Question: Is there anyway to override this - to make the webmap use the map service's projection? I don't see that there is a way to remove the bsemap. The ESRI definition of webmap sorta implies use of one. There is virtually no way to do anything else through Portal interface. But I see that through Python API I can get a reference to the webmap. However, it shows that the property 'spatialReference': None,
Is there any way to use a different projection from basemap? Ultimately, I'd like to build an app in Web Appbuilder with these layers, so maybe I could configure this over the mapOptions in congif.json and the spatialReference there? I haven't looked at that yet.
... View more
06-25-2020
09:28 AM
|
0
|
4
|
5518
|
|
POST
|
Thanks, Noah. That would be a very opinionated conversation on my end, I'm afraid. I think you guys should start by consolidating on one API version. That would make my life easier for starters. Haha. Can you have that done by Monday? Very few of my challenges with ArcGIS web development have been grounded in programming, specifically Javascript programming, challenges or GIS concepts. It's always been: use of a wrong version, inability to locate the right piece of documentation or demo, bugs, the pancake stack of layers of abstraction when using something like WAB and trying to custom develop for it.... On the flip side, it makes those moments a lot more meaningful when I get to say: "Holymoly, it's working!!!" As for my issue described above, I wasn't able to remove those header sections in the suggestions display but instead managed to override the the meaningless value or "service_name + suggestionTemplate" by setting the name property in my feature layers: var featureLayer = new FeatureLayer("http://sampleserver.....................",{
name: <my more meaningful name>,
outFields: ["*"],
displayField: "dispField",
searchFields: ["searchfield1","searchfield2"],
suggestionTemplate: "${suggField1}"/ ${suggField2}",
enableSearchingAll: false,
exactMatch: false,
minCharacters: 0
}); That actually looks kind nice.
... View more
06-19-2020
08:48 AM
|
1
|
2
|
3640
|
|
POST
|
Oh darn! That would be disappointing. I'm using this as part of a custom widget. Don't want to do more custom. It's hard to believe that with all the other silly parameters for tweaking they've crammed into Search, this can't be changed. Thanks, Mark.
... View more
06-18-2020
06:24 AM
|
1
|
4
|
3640
|
|
POST
|
So I'm using a search widget to search across multiple similar (same schema) map services and have set things up to where I get suggestions. Upon selection of a suggestion "result", I've got some event handlers doing what I need them to do and it all works. But I just don't like how the suggestions are displayed. They are grouped by service/source including a header referencing that source something like this: service1 : searchfield1, searchfield 2 record 1 record 2 record 3 service2 : searchfield1, searchfield 2 record 4 record 5 record 6 service3 : searchfield1, searchfield 2 record 7 record 8 record 9 I want all those records but without any references to what service they came from. My Search widget looks like this: this.superSearch = new Search({
sources: list_of_services,
map: this.map,
popupEnabled: false,
autoSelect: false,
enableSourcesMenu: false,
enableSuggestions: true,
maxSuggestions: 5,
allPlaceholder: "Example: John Smith", // I'm searching for names
autoNavigate: false
}, "superSearch"); Is there a way to format this, i.e. drop the "category" header identifying the feature services I'm calling? Thanks.
... View more
06-17-2020
04:18 PM
|
0
|
6
|
3735
|
|
POST
|
Needing some help with ArcSDE Compress over Easter Weekend. Until every recently, I've had a Python script doing SDE maintenance every night - a reconcile/post on all versions, followed by a compress. The database in question houses a number versioned feature classes that are manually edited throughout the day. No huge volumes, but constant change. Also, I have a variety of scheduled FME processes writing to versioned feature classes. This was all working. Then, suddenly I was seeing errors from the FME end about conflicts in reconciling and things started "escalating" from there. What I found was some "bad" data that was stuck delta tables - either as a result of some root cause or maybe the cause of it all ? As remedy, I temporarily disabled some nightly ETL and my scheduled maintenance. Next, and I removed the unwanted records with: exec dbo.set_current_version 'DBO.AdminWork';
exec dbo.edit_version 'DBO.AdminWork',1;
DELETE FROM ...
WHERE....
exec dbo.edit_version 'DBO.AdminWork',2;
Then I disconnected users, set the Allow-Connections to 'False', reconciled all versions, and ran a compress. I've tried this a couple of times ( keeping that infamous definition of insanity in mind), both through ArcCatalog as admin and using arcpy. Each time, I end up with something like this: All my versions point to the same state ABCDEFG. States are down to '0' and 'ABCDEFG' as a child of '0'. This state is associated with a number deletes in one D-table. But someone I seem to be unable to reconcile-post-compress them away. I've used some queries for locks and related processes from this excellent topic. But I have found no locks, and by not allowing any processes to connect, I have to connections by the time I execute the compress. So my question is: What could make those "deletes" persist and keep my versions from all getting back to state 0? (Now, I should note that I realize that usually not getting all versions to compress back to 0 is no reason to panic. But this all started when I was getting errors about conflicts during reconcile. Otherwise, I wouldn't have been poking around.) - Thanks for any clues! Happy Easter.
... View more
04-11-2020
06:01 PM
|
1
|
0
|
1180
|
|
POST
|
Christian, hey, I realize its been a few years since your post up there but this was helpful. So the field you're referring to is: DISABLEDC right? And a value of [num_prop_value] = 1 would mean the connections are not allowed?
... View more
03-23-2020
08:16 AM
|
0
|
0
|
1171
|
|
POST
|
Is there any way that a 'named user' Pro license that is being consumed by a service account has to be released so that the same account can "check out" this license on another machine? I know there is no real check in/out for named users. But I'm running into an issue where I want to have the same account running the same script on different machines but it will only complete on the first machine. I can schedule it to run on either machine over night and it runs fine. As soon as I want to run it on both machines, it will fail on the second one. I've wrapped my import into try/except to make sure that's really where it's failing: try:
import arcpy
except Exception:
with open(r'C:\temp\arcpyIssue.log','w') as failurelog:
failurelog.write("Unable to get arcpy license")
and that appears to indicate the arcpy import is the issue? Any thoughts? Shouldn't I be able to run as many instances of Pro or Pro licensed Python under the same account as I want? I seem to have no issues having instances of Pro open on multiple machines using my own account.
... View more
03-10-2020
12:05 PM
|
0
|
1
|
1788
|
|
POST
|
What exactly is the difference between manifest.json and manifest.xml. I mean both are a format for a service manifest but I thought JSON had replaced XML. Under what circumstances should I still be seeing XML when publishing map services to ArcGIS Server? I'm using something like this to find data sources behind services and it bombed for any XML: manifestPath = os.path.join(folder, "extracted/manifest.json" )
if os.path.exists(manifestPath):
with open(manifestPath,'r') as f:
text = f.read()
else:
print(folder, "XML only")
pass
manifestJSON = json.loads(text) Of course, if you use the ArcGIS Python API, you can do something like: from arcgis import gis
mygis = gis.GIS('https://..../portal/home/', username='arcgis_python')
servers = mygis.admin.servers.list()
server = gistest.admin.servers.list()[0]
services = server.services
Then, once you have a reference to a specific service, this works: service._service_manifest() I was really just wondering where the XML comes from. Wasn't expecting to see that and I see it in a very few cases.
... View more
03-05-2020
05:07 PM
|
0
|
0
|
1727
|
|
POST
|
Just when you think you've read every thread about arcpy/Pro to get your script to run and feel confident to have mastered this ridiculous convoluted world, you're back to square zero. I mean I have literally spent hours reading about installation/configuration of Python 3.x/conda with ArcGIS Pro. I've replied to a number of threads feeling knowledgeable enough to chime in. But I don't know what's going on here. I have an SDE maintenance script running on one server under a service (domain) account, and it works beautifully. I had to: Install Pro (this is 2.3). Create a Portal user for the service account (for licensing) and make it admin. Open Pro on server once and connect to correct portal. Upgrade to latest version of arcgis package. No other changes to conda env. Only: C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 Write my script. Set up a Windows Scheduled task to use service account and run script with highest privileges Grant service account logon-as-service/RDP access Cross my fingers, and .. Boom everything worked. Now, on server 2, where I did the exact same thing, same script, same tasks, same service account, nothing happens. Can't run Python as service account. That gives me an Application Error 0xs0000022. The application was unable to start correctly (0xc0000022).
Click OK to close the application. Inside Pro (running as srv account), I can open Python window but when I import arcpy, I get: PermissionError: [Errno 13] Permission denied:
'C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\
envs\\arcgispro-py3\\Lib\\site-packages\\mkl_fft\\__init__.py'
What am I doing wrong, what step did I skip or screw up on ? Thanks.
... View more
03-05-2020
08:46 AM
|
1
|
3
|
3401
|
|
POST
|
Trying to take a subset of available layers in the map of an ArcGIS Pro project (aprx) and make sure they are in the right order. (I'm trying to dump the arranged layers into a PDF). Originally I started out just hiding (setting layer.visible = False) for any layers I don't want. But while there were no errors, it didn't yield the expected results. The resulting layer order in the aprx is not the same as in Pro. So I thought about removing all layers and adding back in those that I need. While I can do this: while map.listLayers():
map.removeLayer(map.listLayers()[0]) ...to get rid of all layers, I can't do something more refined like: layerNames = ['layer 1', 'layer 2', 'layer 3' .... ]
for layerName in layerNames:
map.removeLayer(map.listLayers(layerName)[0]) That blows up even though my layer names... for layerName in layerNames:
----> 6 map.removeLayer(map.listLayers(layerName)[0])
IndexError: list index out of range ... are all included in the list that is ... [l.name for l in map.listLayers()] So I can't figure out what's going on. I've tried individual layers and have found a few that worked. But I can't tell what's different about them. Depending on what type of layer it is, it's also hard to compare values for all the attributes.. 'brightness', 'connectionProperties', 'contrast',
'dataSource', 'definitionQuery', 'extrusion',
'getSelectionSet', 'is3DLayer', 'isBasemapLayer',
'isBroken', 'isFeatureLayer', 'isGroupLayer',
'isNetworkAnalystLayer', 'isNetworkDatasetLayer',
'isRasterLayer', 'isWebLayer', 'listLabelClasses',
'listLayers', 'longName', 'maxThreshold', 'minThreshold',
'name', 'saveACopy', 'setSelectionSet', 'showLabels',
'supports', 'symbology', 'transparency',
'updateConnectionProperties', 'updateLayerFromJSON', 'visible' So if I go the route of removing all layers... map = aprx.listMaps()[0]
layers= [l for l in map.listLayers()]
while map.listLayers():
map.removeLayer(map.listLayers()[0]) and then try to add one back... map.addLayer(layers[0],'TOP') I get this error: C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\utils.py in fn_(*a, **k)
189 "Invalid value for %s: %r (choices are: %r)" %
190 (key, val, list(cls.__args__[key].values())))
--> 191 return fn(*args, **kw)
192 # Add the old argspec to __doc__
193 doc_addendum = "%s%s" % (fn.__name__,
C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\_mp.py in addLayer(self, add_layer_or_layerfile, add_position)
1135
1136 * TOP: Places the layer or layers at the top of the TOC layer stack."""
-> 1137 return convertArcObjectToPythonObject(self._arc_object.addLayer(*gp_fixargs((add_layer_or_layerfile, add_position), True)))
1138
1139 @constants.maskargs
ValueError: <MappingLayerObject object at 0x0000012704F6B570> Anyone have any idea what's going on here or what I should do instead?
... View more
03-04-2020
04:08 PM
|
0
|
1
|
7798
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-16-2025 07:32 AM | |
| 1 | 02-09-2024 05:18 PM | |
| 1 | 02-04-2025 09:27 AM | |
| 1 | 03-22-2019 10:55 AM | |
| 1 | 03-05-2020 08:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-15-2026
12:14 PM
|