POST
|
@becyr Sorry to hear about your troubles there. I fell for you. I can relate. Currently rebuilding a bunch of old WAB app that have GP services associated in JSAPI 4.x. Total waste of my time, it feels like, when I could be focusing on value-add type work. While I have had ESRI folks on the phone telling me that Desktop/Server (Enterprise) compatibility is more of a recommendation than a strict rule, my experience is that you want to match what they "recommend". In fact, the my main reason for going to 11 is so that I can continue upgrading Pro. https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/web-tool-compatibility.htm Try to stick with this. Otherwise, you'll have to work with some hacks. You using any Layout templates? I posted a while back on how you can force them to work using a "hack". Stop publishing in ArcMap. I still use it all the time for viewing data. But consider it "verboten" when working with Enterprise. My two cents. Good luck!
... View more
3 weeks ago
|
1
|
0
|
82
|
POST
|
Hey @JoelBennett - Thanks. Really appreciate you chiming on . I will take a look at this. But I have to wonder why something so simple had to become so complicated. Haha. I looked at the V3 code in PrintTask and it looks like a bunch of toJSON() functions were used to get the mapOptions and a _createOperationsLayers call to get the layers. All that was returned a JSON dictionary. --- I'll let you know if I can get your examples there to work. Thanks again.
... View more
02-05-2025
11:22 AM
|
0
|
1
|
323
|
POST
|
I'm currently in the process of converting some JSAPI 3.x code to 4.x. It used to be you could do this in 3.x //Use
esri/tasks/PrintParameters,
esri/tasks/PrintTask
//To get this
var params = new PrintParameters();
var webMapAsJSON = printTask._getPrintDefinition(<currentMap>, params); webMapAsJSON could then be sent to a custom geoprocessing service using var gp = new Geoprocessor("your service's url") and manipulated to your heart's delight in Python on the back end. Looks like "PrintTask" was deprecated back in 4.24... is there any way to still grab that JSON? I do not just want to send current state of web map to a layout using the new "print" module. I have all kinds of existing logic in arcpy that I want to apply before creating a PDF.
... View more
02-04-2025
09:27 AM
|
1
|
3
|
374
|
POST
|
Take a look at this... Create new field to calculate lat/lon in decimal degrees You may have to actually convert the UTM XY to LL's yourself.
... View more
12-06-2024
01:01 PM
|
0
|
0
|
320
|
POST
|
Doug, I've never used the OOTB Geoprocessing Widget for WAB but I've made extensive use of the JSAPI "esri/tasks/Geoprocessor" to get stuff from a web app into a custom GP or print service. If you're able to create a custom widget (pretty straight forward), you can pass in all kinds of info that way whether it's information about the current map status or user provided info via HTML inputs. Not sure what changes there are in 4.x versus 3.x as I'm just now in the process of migrating things. But if you're in WAB, you're using 3.x and that's what I used. If you already know all this, and it doesn't answer your question. then I apologize. Haha.
... View more
12-06-2024
12:53 PM
|
0
|
0
|
293
|
POST
|
Sorry only seeing this now. But it's been a few years and countless upgrades since. I know I got it to work eventually and suspect it must have been service account permissions or something like that. Sorry to not be of more help.
... View more
11-25-2024
06:23 PM
|
0
|
0
|
757
|
POST
|
Anyone come across this lately? ExecuteError: ERROR 001426: Failed to retrieve the job status from hosted services.
Failed to execute (UploadServiceDefinition). I see some older posts (2019) but nothing more recent. Just spun up a new test environment for Enterprise 11.3. Trying to get some services published in batch via arcpy using Pro 3.3. Seems to all be working but I still end up with this error. When I check, I see it successfully created both an item in Portal and a service at REST endpoint for my federated server. So is this merely some timeout thing with status or something I need to investigate further? Weird thing is that the machine isn't actually configured as hosting machine as the error suggests.
... View more
11-19-2024
02:17 PM
|
0
|
0
|
242
|
POST
|
That's great, @ErikKjellman ! This is all completely crazy if you ask me. You can't be expected to re-publish everything when it's time to upgrade your Enterprise environment. But in fact, these freak issue with version inconsistency may end up being the sole reason for me to upgrade to Enterprise 11 at some point. Latest issue I had was that a Layout Template (PAGX) created in Pro 3.1 will not work with arcpy GP services in Enterprise 10.9.1. Unfortunately, I did not have a copy of the Pro project in an earlier version since it was a more recent effort. Simply fooling server by editing XML no longer worked either. But what did work was creating a PAGX in 3.1, then importing that in an install of Pro 2.7.4 and then exporting it as 2.7 from there. haha. Nuts, right? But it saved me hours! So, again, I ask: what is the purposes of embedding the version in the file?
... View more
08-21-2024
09:11 AM
|
0
|
0
|
1330
|
POST
|
@UndralBatsukh Sorry about the late reply... how do I create the layer? @Arne_Gelfert wrote: Where does interesting_layer come from? I currently loop through webmap layers once view has loaded and assign some names to key layers I want to interact with later. var interesting_layer;
view.when(function() {
//The following is another simplified version of what's actually
//defined in another function elsewhere
webmap.layers.forEach(lyr => {
if (lyr.title == 'layer_of_interest')
{ interesting_layer = lyr }
}); So, it's actually a sublayer from the web map of type 'map-image'. I figured that would work. But maybe ESRI is throwing me another curveball. I'll take another look when I get a chance. Thanks for chiming in.
... View more
08-21-2024
09:04 AM
|
0
|
0
|
585
|
POST
|
Simple question(s) alert ! (Although some of you may find it vague or missing more detailed code. Unfortunately, I cannot paste all my code here.) Why would hitTest() only return basemap hits as a result when I have several layers in my map? Do layers from a webmap brought into your app as Portal item work differently from those that are added as layers (Featurelayer/MapImageLayer) via URL? I recently started transitioning from JSAPI 3.x (WAB-DE stuff) to 4.x (4.30) and might be stuck in some legacy way of thinking. When I do this: view.on("click", (event)=> {
view.hitTest(event).then((response) => {
// Hoping for some results from the layers in the map
// but response.results include only the basemap.
console.log(response.results.length) // = 1
});
}); When I try with options, and specifically list one of the layers in the map, I get the same result. view.on("click", (event)=> {
opts = { include: interesting_layer};
view.hitTest(event,opts).then((response) => {
//Hoping for some results from the layers in the map;
//But no!
console.log(response.results.length) // still = 1
});
}); Where does interesting_layer come from? I currently loop through webmap layers once view has loaded and assign some names to key layers I want to interact with later. var interesting_layer;
view.when(function() {
//The following is another simplified version of what's actually
//defined in another function elsewhere
webmap.layers.forEach(lyr => {
if (lyr.title == 'layer_of_interest')
{ interesting_layer = lyr }
});
... View more
08-13-2024
03:20 PM
|
0
|
2
|
672
|
POST
|
So I have run into all kinds of variations of issues with Layout templates (pagx) after upgrades. it doesn't matter if you're upgrading the client (ArcGIS Pro) or ArcGIS Server. Any geoprocessing services working with the PAGX will suddenly bomb. After trying to code around this in arcpy where all the sudden things we're spitting up errors - layer types start behaving differently or no longer have certain properties, and failing to find useful, comprehensible or accurate documentation for CIM (Cartographic Information Model) to exploit , I just decided to lie and cheat. Export your PAGX from Pro, open it up as XML in any IDE and switch the version at the very top from 3.1.x or whatever you're using to 2.7.0 or whatever the last version was that you were successfully using. Then save. "type" : "CIMLayoutDocument",
"version" : "2.7.0", Chances are things will miraculously start working, begging the question why this all has to depend on some CIM version. I find it impossible to keep up with ESRI releases these days, and am resigned to the fact they usually break as much as they fix. So, staying on a somewhat stable release for as long as possible has become a means of survival for me. If that sometimes requires desperate measures, so be it.
... View more
02-09-2024
05:18 PM
|
1
|
0
|
1746
|
POST
|
Hey ESRI... any update on this? I don't know how you go from working products to broken products all the time. Installed 1.12 after enrolling in one of your EB classes. Now I upgrade to 1.13, and can't even finish the install/setup...so back to 1.12. This vicious cycle Bug/Bugfix/Bug is really the most annoying aspect of my job.
... View more
02-07-2024
05:15 PM
|
0
|
0
|
1627
|
POST
|
@GrantDickins_OX2 Saw this while scouring the forums for 3.1 issues before upgrading... I bet you could script that import/export for all your layouts with arcpy. Say here this functionality was added in 2.6 but of course, I can't find any examples of it. So maybe it's not possible after all.😂
... View more
03-29-2023
06:40 AM
|
0
|
0
|
2325
|
POST
|
Sorry, Mike. I moved on to 10.9 and have no insights to share for 10.8. Luckily, there is now Enterprise 11 if you're feeling adventurous.
... View more
02-14-2023
11:37 AM
|
0
|
1
|
4244
|
Title | Kudos | Posted |
---|---|---|
1 | 3 weeks ago | |
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 |
yesterday
|