|
POST
|
Likely this is explained somewhere but I can't find it and nothing I've tried seems to work. Working in WAB DE 2.16 with corresponding JSAPI 3.x. The back and forth between the JSAPI documentation and the cryptic jimu pages is killing me. I have a dojo dropdown that allows me to set a filter expression for a particular layer. Depending on the value selected from the dropdown, only features with attribute A matching the dropdown value are shown in the map. Simple enough, right? Now I would also like to color those features based on Attribute B as part of the same dropdown event handler. Value1 = 'red', value2 = 'blue', value3 = 'green'... something like that. I have created a renderer that dynamically creates a list of colors depending on the list of values for Attribute and I seem to be updating the layers renderer. But the change is never reflected in the map. I am doing something like this: var nodeId = 'my_id'
var layerStructure = LayerStructure.getInstance();
var myLayer = layerStructure.getNodeById(nodeId);
myLayer.renderer = uniqueValueRenderer; I can see in Dev Tools myLayer now has this renderer with the correct number of values. But the map does not update. myLayer.refresh() doesn't work. It says: Not entirely sure what the difference is between the layerNode and layerNode.getLayerObject() but when I try this: myLayer.getLayerObject().then(function(result) {
result.renderer = uniqueValueRenderer;
console.log(result);
result.refresh();
}); there is no error and I also see the renderer when I look at 'result'. But again, the map doesn't update. And how about RendererChooser? Where does that come in? I've looked with no luck for an example of how that's supposed to be used but I can't find one. Is this a features vs. graphics issue? Am I not seeing the trees for the forest?
... View more
06-11-2021
12:26 PM
|
0
|
2
|
1284
|
|
POST
|
@Tim_McGinnes - so units and CRS match for view and layers but it turns out that when I use: {...
ground : 'world-elevation'
...} in my map definition, I get: [esri.views.3d.layers.ElevationLayerView3D] #resolve() Failed to resolve layer view (layer title: 'Terrain3D', id: 'worldElevation') because that layers has while the scene has: And per ESRI's book of non-no's: A SceneView will only render layers that define a HeightModelInfo with an identical vertCRS to that of the scene, when using an ellipsoidal height model. So thanks for pointing me in the right direction. Not entirely sure where I have to fix this - whether before publishing my service or in the code somewhere - but the fog is lifting for sure.
... View more
06-10-2021
01:31 PM
|
0
|
1
|
2820
|
|
POST
|
I thought about the feet/meters thing as well and turns out that my source data actually has Z in meters. But after looking at the documentation again, I realize the "units" parameters in elevationInfo has not effect on Z. I also found that using the offset = -1000 works and forces all lines down by 1000 units. But that's not really what I need. It's as if it's either ignoring or misinterpreting ground. Haven't looked at HeighModelInfo. Not sure I had come across that. So this may help with elevation. Sorry I'm not posting the a whole lot of code here. Still appreciate your feedback.
... View more
06-10-2021
09:53 AM
|
0
|
2
|
2821
|
|
POST
|
Thanks, for chiming in, Tim. So, say I have a 3D polyline that starts at XY and has Z = 1000 (as in 1000ft above MSL), and it has an endpoint of XY with Z = -1000, 1000ft below MSL. With the following settings in ArcGIS Pro: This line plots entirely below the surface where elevation is at 1000' MSL. Great. just what I want. After publishing this to ArcGIS Server and adding as FeatureLayer to webmap, I am unable to get it to plot as in Pro. No matter what settings I try in elevationInfo, the feature will always start 1000' above the surface (ground) and extend to 1000' below surface. So everything is relative not to MSL but ground. So maybe I need to define ground differently? I've looked at the documentation and haven't found anything.
... View more
06-08-2021
12:20 PM
|
0
|
4
|
2835
|
|
POST
|
@Tim_McGinnesThanks, Tim. Of course, I looked at that page and the observations I made were based on the different value for elevationInfo provided on that page. I've also since played with trying to use expressions but as soon as I do something as simple as : featureExpressionInfo: {
expression: "Geometry($feature).z * 2"
} the feature appear flat, draped across the ground.
... View more
06-07-2021
06:47 AM
|
0
|
6
|
2850
|
|
POST
|
Trying to visualize some subsurface polyline features in 3D. Created a Scene in Pro and published to Portal/Server. Then using JSAPI 4.18 to display. The following plots my polylines. const my3DLinesLayer = new FeatureLayer({
url : 'my 3d URL',
elevationInfo : {
mode: 'relative-to-scene',
},
renderer : myRenderer
}); But so do: mode : 'absolute-height' and mode : 'relative-to-ground' What am I missing when it comes to the difference between "relative-to..." and "absolute..."? In each case, my lines plot starting above ground and then continuing into subsurface. Since the line's starting point has a Z > 0, say Z = 1000, it looks like it get plotted starting 1000 units above ground. But the Z = 1000 should really be interpreted as starting at ground where ground = 1000 because these are absolute elevations. So I can understand that 'relative-to-surface' or 'relative-to-ground' would work as described above - we're taking positive values for Z and plotting them above the ground and negative Z below - but why 'absolute-height'? Doesn't the ground elevation layer plot in relation to some approximation of sea level? So if ground is 1000 units above sea level, that's where my line-Z should be? This is what I have in my map right now: const map = new Map({
basemap: "satellite",
ground: "world-elevation",
fadeOnZoom: true,
force3DTransforms: true,
navigationMode: "classic"
}); Thanks for any suggestions you may have. I'm new to 3D in web mapping, so I may not be missing something obvious. @RalucaNicola - tagging you here since I've seen some great feedback from you in other threads. 😊
... View more
06-04-2021
10:01 AM
|
0
|
8
|
2905
|
|
POST
|
So I spent the better part of three weeks trying to dissect this issue with all kinds of help from and reporting back to ESRI. Nothing worked. The code works in 10.6.1 and fails in 10.8.1. Finally, I threw n the towel and upgraded to 10.9 on my GP Server only. I call the GP service on that machine after the upgrade and without any additional configurations, environmental changes or code tweaks it works out of the box. To me that means there is a bug in 10.8.1. Will upgrade to 10.9 and not look back. I used to consider waiting for the Dot-1 a safe practice but these days it feels like that as much stuff breaks in service packs and patches as gets fixed. So why wait!?
... View more
06-04-2021
09:35 AM
|
0
|
0
|
3738
|
|
POST
|
Appreciate it, Mattias. Yes, it sounds like our situations are somewhat different. By now, I have a ticket open as well. I have picked my setup apart, and everything is working except the line: layout.exportToPDF( ... ) Layout is fine, so is the path I'm exporting to. But things still bomb. I've ruled all kinds of variations on the publishing and scratchFolder/scratchWorkspace theme. I've seen so many fixes in the Pro/Server release note related to "PDF,export, layout", I'm starting to think there is another one lurking in there ! Stay tuned...
... View more
05-20-2021
12:13 PM
|
0
|
0
|
1203
|
|
POST
|
Ahh... I see what you mean. What I intended to say was that I see those lines in the Windows application log via Event Viewer on server.
... View more
05-14-2021
10:51 AM
|
0
|
0
|
1217
|
|
POST
|
Not sure what you mean by "not windows things"... but thanks for the reply. If you're retired, gee, you will be missed! Have a good weekend!
... View more
05-14-2021
07:23 AM
|
0
|
2
|
5318
|
|
POST
|
@MattiasEkström @DanPatterson - Man, I was really hopeful when I read Matthias' line It worked with ArcGIS Server 10.6.1, but when trying it with ArcGIS Enterprise 10.8.1 it doesn't work. Having the same issue with GP Process not working after upgrading to Server 10.8.1 and applying all patches. But it still fails. I've narrowed it down to the line: layout.exportToPDF(...) When we get there, GP service bombs without any Python error in arcgisjobs/../...gpserver/...some jobid .../scratch/messages.xml I'm not used to seeing that. Usually the errors here help you fix your logic. Instead of a Python error, I get a Windows error: Faulting application name: ArcSOC.exe, version: 12.6.0.24234, time stamp: 0x5ee81bca
Faulting module name: MappingCore.dll, version: 12.6.0.24241, time stamp: 0x5f8883dd
Exception code: 0xc0000005
Fault offset: 0x000000000049cfa4
My first guess was it'd be a Python 2.x/3.x thing. I know there are some new features in 10.8.1. But all my imports are working fine. I can create an APRX from JSON using arcpy.mp with no issues. This was published first from Pro 2.6.3, then at the suggestion of ESRI, after upgrading, from Pro 2.7.3. Still the same error. Dan, adding you in here because you've been a life savor before. Ever seen that kind of DLL thing before. Is it Python? Is it AGS? I've checked all my AGS account permissions. No scratch folder issues. Paths all my sense. Looks something like this: E:\arcgisserver\directories\arcgisjobs\..\.._gpserver\jf86961dfcf734510b848834890dc0e55\scratch\mylousyfilethatwontprint.pdf Any pointers or thoughts appreciated.
... View more
05-13-2021
03:03 PM
|
0
|
6
|
5327
|
|
POST
|
Thanks for the feedback. Also started working with our TAM on this. Before I do a clean install of the server, I'll try upgrading my ArcGIS Pro to 2.7.x. I see the release notes for 2.7.0 and 2.7.1 are shock full with fixes related to PDF and layout printing. So maybe I get lucky. Stay tuned.
... View more
05-12-2021
06:32 AM
|
1
|
0
|
3885
|
|
POST
|
@TanuHoque - Ok, I have stepped through my code line by line. Looks like things bomb when we get to: layout.exportToPDF(....) This worked fine in 10.6.1 -- Has anyone run into similar issues or found a solution? Is this another bug or related or some completely separate issue? There was a question asked about layout.exportTo..() in this thread but I don't see an answer other than the patch that didn't fix this for me.
... View more
05-11-2021
11:19 AM
|
0
|
0
|
3897
|
|
POST
|
Looks like it's been quiet in this thread. Did everyone get their issues fixed, or throw in the towel? The patch seemed to fix any issues for custom print services using layouts created using ArcGIS Pro (2.6) Server Tools for printing. In a custom Python GP/printing service, things bomb when we get to: layout.exportToPDF(....) This worked fine in 10.6.1 -- Has anyone run into similar issues or found a solution? Is this another bug or related or some completely separate issue? I started a separate thread before finding this one.
... View more
05-11-2021
11:17 AM
|
0
|
0
|
2361
|
|
POST
|
@TanuHoque - pinging you directly because you helped the other day by directing my attention to the patch for custom printing in ArcGIS Server 10.8.1. That fixed my problem with custom print services created using Pro's Server Tools for Printing >> Export Web Map/Get Layout Templates. Now, I'm running into issues (see post above) with migrating a more complex custom GP/printing service that uses arcpy.mp, specifically arcpy.mp.ConvertWebMapToArcGISProject( ... ) Do you know of any issues in 10.8.1 or needed changes to get what was running in 10.6.1 to work here? I haven't found any changes to arcpy. It all sounds very similar to what's described in the patch for BUG-000133729: This patch resolves an issue affecting geoprocessing services and print services in ArcGIS Server 10.8.1 that prevents working with or exporting layout templates or reports that contain text elements. I'm using a pro custom layout that's used by arcpy,mp along with the JSON from JSAPI to create an in-memory APRX that is then converted to PDF. Works like a charm in my production 10.6.1 environment. In 10.8.1 I'm seeing those DLL errors. Was the patch also to address this kind of thing? I'm trying this on the same ArcGIS Server box that was patched.
... View more
05-11-2021
09:11 AM
|
0
|
1
|
3903
|
| 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 week ago
|