|
POST
|
Okay, your LayerToggleButton works like a charm. Now, let me ask you this: Would this be a good candidate to heed your repeated advice and encouragement to dig into the jimu jambalaya to adapt for my purposes? If I wanted to change the behavior to be: Use a dropdown widget: Basically you pick your layer or group of layers from a dropdown. Selection of that layer(s) turn on that layer(s) and turn of all other layers What changes would be needed? I'm assuming... LayerSelector.html would need to get a dropdown. I'm not familiar with all the dojo/jimu elements but I can figure it out. LayerSelector.js - I can't even begin to wrap my brain around this yet. A lot of this is just needed to make the widget configurable, right? I suspect, there would have to be a way to name your elements for the dropdown and assign layers to each, provided it's not a 1:1 but groups of layers getting assigned to one dropdown item. How much of this could be gutted if I didn't need it to be configurable but was able to just hard code which layers correspond to which element in a list of dropdown items that i define? Have you ever considered writing a book about all this? Seems like based on all the Geonet posts of yours I have read, you'd be the right one to do it. I find that without some decent tutorial, I will never have enough cycles to dedicate to this, and will likely have to get some outside help. Which is a huge disappointment in ESRI. But you have to be realistic. Anyway, I'll go through the code with a fine tooth comb and see what nuggets I can tease out of you with my next post.
... View more
12-18-2019
08:23 AM
|
0
|
9
|
4228
|
|
POST
|
Thanks, Robert... I stumbled upon this after posting my question and looked at your sample. Sounds like this might do the trick. Stay tuned... I may have some questions on how to tweak his.
... View more
12-17-2019
07:29 PM
|
0
|
0
|
4228
|
|
POST
|
As noted in another post just minutes ago, I'm in the process of converting some existing custom Geocortex tools to ESRI WAB or JSAPI web functionality. Geocortex offers the apparently rather popular Themes concept in their framework. It's a way to group a number of layers into a theme and then turn layers on/off by switching from one theme to another. So you'd either pick a selection from a dropdown, or with only two choice toggle between two states to activate (turn on) one group layers, thereby turning the other(s) off. QUESTION: Is there an obvious OTB or available custom widget candidate to do this? Certainly don't want to make anyone have to interact with the LayerList or TOC to hide or unhide layers. it should be more one-click behavior. I could see how you'd build two web maps from map services in Portal and then flip back and forth between those. It's quite easy to build this using the JavaScript API. All you need is a HTML dropdown element with some event handlers that then turn on/off layers. Unfortunately, I have not been able to twist my brain into a shape that would allow me to decipher custom WAB widgetry . So hoping that someone has used one of the available widgets for this purpose? Thanks!
... View more
12-17-2019
12:25 PM
|
0
|
12
|
5600
|
|
POST
|
I'm in the process of converting some existing custom Geocortex tools to ESRI WAB and JSAPI web tools. For one of these, what I'm looking to recreate is the ability to: Query for and select a feature Generate a set of PDF maps centered on that feature with some pretty strict layout spec's. Finally prompt the user to download/save the PDFs as ZIP. ESRI suggested that I look into using the Geoprocessing Widget to call a geoprocessing service that generates the maps. GP Widget looks promising. QUESTION 1 - Is there another more appropriate out of the box offering? I've previously set up a custom print template on my hosting server, which worked fine. But what I need is a little more, I guess you'd say - complex. More like a fancy ultra print widget with the ability to pass in some parameters that are used as text in a print template. Of course, I immediately started reading about arcpy.ConvertWebMapToArcGISProject(). The thought of working out my functionality in Python has a much great appeal than trying to whip up some jimu-jambalaya in WAB (sorry still not feeling the love). QUESTION 2 - What is the easiest way for me to generate some sample JSON based off an actual web map of mine that I can use for testing with my geoprocessing code? I could, of course, follow the guidelines here. But is there a simpler (lazier) way? Something similar to generating JSON output for a map service using the "?f=pjson." karate chop. https://server.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer/0/?f=pjson Hey, thanks for chiming in.
... View more
12-17-2019
12:05 PM
|
0
|
6
|
3050
|
|
POST
|
Okay, so you hate to answer your own question because it just proves you either didn't think through the question carefully before posing it or you were just too lazy to try and answer it yourself instead of wasting everyone else's time by asking them. In my defense I can only say that sometimes spelling out the question helps me phrase it properly in my mind and gets the investigative, inquisitory juices flowing. So while I wasn't able to create a user for my service account in Portal ('Add Members' isn't really intended for that), I was able to so in the Portal admin interface. All I did was create an admin user here, then I could grant that user 'Admin' status in Portal under Organization, plus Level 2 status, and a Pro license. Could be that was overkill. But at least it now allows the account to import arcpy in Python 3.6 and execute my script.
... View more
12-11-2019
02:38 PM
|
3
|
1
|
3508
|
|
POST
|
Zachary, as usual, I've struggled a bit with digesting the ESRI jargon. I believe the Python API is really a label for the arcgis module, right? That's a powerful toolkit for web GIS stuff, even creating little interactive maps inside Jupyter notebook, etc. But as far as geoprocessing is concerned, it's still largely arcpy, installed alongside arcgis. Granted, one will still land in the Pleistocene world of Python 2.7 by default. But you can install arcpy in 3.6 with conda. Long story short, I still use both and will continue to do so. They're different animals that complement each other. Just be mindful of slight some differences in the way arcpy is structured in 10.x and for Pro. Cheers
... View more
12-10-2019
03:43 PM
|
1
|
5
|
2563
|
|
POST
|
Try this. It will tell you if you have openpyxl installed. Do this at the Windows command line: conda list This lists all the packages that are installed. If you don't see openpyxl, then try: conda install openpyxl You might have to accept some other dependencies that need to be installed along with the package.
... View more
12-10-2019
03:26 PM
|
0
|
5
|
2254
|
|
POST
|
I have been trying to move off Python 2.7 and rewrite my scripts in Python 3.6 that shipped with ArcGIS Pro. So far no real upsets as long as I'm the one running the script. (I'm licensed for Pro.) But when I try scheduling a script with Task Scheduler via batch file using a service account on a server, the script dies. When I run python cmd as service account and then try "import arcpy", I get: Interesting ... but makes sense that arcpy requires licensing. So since I have Pro on the same box, I tried that and also get a licensing message - "A core license could not be found...". I see there is a way to log in to Portal in Python... arcpy.SignInToPortal(arcpy.GetActivePortalURL(), 'username', 'password') But I guess my service account first needs a Portal account. When I try to grant that as Portal Admin, I get : One or more members are missing an email address and will not be added. Oh c'mon!!! So do I now have to request an email address for my service account? Or is there another way to make this work? Help!
... View more
12-10-2019
02:49 PM
|
1
|
2
|
3628
|
|
POST
|
No never have... plus it gets worse when you're running into the issue with wanting to republish a service that someone else has created or wanting to script out publishing of a bunch of maps others have been tweaking. Here ESRI's logic really defies how the world works.
... View more
12-10-2019
02:16 PM
|
1
|
0
|
3905
|
|
POST
|
I think you'd have to save your copy inside the loop. Close the aprx. Set the aprx variable back to an empty aprx and import the next mxd. Haven't tried it but that should work. In my case, I wanted to have all the maps together in one project.
... View more
12-10-2019
02:13 PM
|
1
|
0
|
2426
|
|
POST
|
FC, thanks for the comment. I had a BAT file that works. It was the actual command for msiexec that wasn't working. Chris (other comment below) helped me with this. Appreciate you chiming in though. 🙂
... View more
11-14-2019
12:40 PM
|
0
|
0
|
2204
|
|
POST
|
Christopher, thanks - that worked. I'm no CMD guru. Wondering if replacing "/qn" with "/quiet" is all that was needed. Anyway, thanks for chiming in.
... View more
11-14-2019
12:38 PM
|
1
|
0
|
2204
|
|
POST
|
So I wanted to apply a number of patches to ArcGIS Server and Portal machines but apparently there is a BUG in the "ArcGIS Enterprise Updates" tool for 10.6.1 that's included. If you click "Install All Patches", it will do so for one, and then shut down. If you try the first proposed workaround, "If there are multiple ArcGIS Enterprise components installed on the same machine, use the Patch Notification Tool with one of the other components." you find it doesn't work. While I have to shortcuts - in my case, one for Server, one for DataStore - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\ArcGIS Server 10.6.1 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ArcGIS\ArcGIS Data Store 10.6.1 …they both point back to the same tool: \ArcGIS\Server\tools\patchnotification\patchnotification.exe If you then try... \ArcGIS\DataStore\tools\patchnotification\patchnotification.exe ... and use it to run ArcGIS Server patches, it errors out for each Patch. If you try the other ESRI work-around and download and install each patch individually which is an arduous task, you end up with all the patch MSP's in ..\appdata\local\temp. I was hoping to be able to use those downloads and automate patching of the next machine. But I can't figure out how to do that using Window CMD and a batch file. I've tried various permutations of things like: msiexec.exe /i <path_to_msp> /qn /l*v "<path_to_logfile>" But that didn't work. Using only the syntax ESRI suggests here: msiexec.exe /p <path_to_msp> doesn't seem to run silently, and expects some UI interaction. Ultimately, I had hoped to use Python/subprocess and iterate over the MSP files and install them with msiexec. So if you've figured out how to make this kind of thing work, please holler. I see a lot of automation for patching for ArcMap or Pro, anyone tried it with Enterprise components?
... View more
10-30-2019
01:44 PM
|
1
|
4
|
2437
|
|
POST
|
Stumbled over this while trying to refresh my grasp of arcpy cursors. Not entirely sure what you're doing here. But the first thing I notice is that your Update and Search Cursors reference different fields; "LANDLOT" vs "LAND_LOT", and "LANDDISTRICT" vs "LAND_DISTRICT". So DL never gets assigned anything. So when you call DL[0], your error screams: local variable 'DL' referenced before assignment There is a lot of info on this kind of error out there, e.g. Understanding UnboundLocalError in Python - Eli Bendersky's website.
... View more
10-22-2019
09:50 AM
|
1
|
0
|
2036
|
| 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 |
a month ago
|