POST
|
Incidentally, I followed up with an Esri rep and confirmed this is the expected behavior.
... View more
08-28-2017
01:26 PM
|
0
|
0
|
1128
|
POST
|
It sounds like this is technically the correct answer for the question as asked. Though many thanks for TSolow-esristaff for super helpful info on getting me around the issue.
... View more
08-23-2017
08:19 AM
|
0
|
1
|
1128
|
POST
|
Thanks, Thomas. The number of features being sent varies quite a bit but hovers around 100. The feature layer in question is plotting US ZIP Codes - so while there may not be many features, their geometries can be complex (the vast majority of the request payload is geometry rings). The layer is not set to display at high zoom levels. Thanks for sharing the link below - that's super helpful. I'll experiment setRequestPreCallback as you demonstrated .
... View more
08-23-2017
08:15 AM
|
0
|
0
|
267
|
POST
|
FYI I'm seeing request payloads of about ~20MB. This thread (Export Web Map Task - JSON length limit?) led me to check my own server configs and indeed I'm at the default of 10MB as a cap for POST sizes. I checked the other components of my stack and as far as I can see this is the only place I could be hitting a size limit. Hopefully that provides a short term fix but figuring out how to bring this down to a reasonable number could still be interesting.
... View more
08-22-2017
07:42 PM
|
0
|
4
|
1128
|
POST
|
Hi, Robert. I'm sorry, would you mind elaborating on that last comment? I see esriRequest but it looks like an AJAX helper utility. Is there a way to intercept requests made by the framework with this? Or are you suggesting I just redefine "esri/request".
... View more
08-22-2017
07:36 PM
|
0
|
0
|
1128
|
POST
|
Hi Thomas, thanks for the response! It's a fair point about features needing to make their way to the print service either way. That said, coming from the client we're potentially talking about a lot to send over the wire. We also have much less control over network speeds, etc. I feel like you could support better (or just different) feature resolution with those geometries getting expanded on the server as opposed to just using what's on the client. But you're absolutely right, it's gotta happen somewhere. It looks like I'm *mostly* seeing things being filtered by view extent with a bit of a buffer. This makes sense, depending on the dimensions of the export image vs the client side view you might need more or fewer features than reside within your view extent. I copied the error from ArcServer logs below. The Web Map as JSON param is definitely present when the request leaves my browser. It could be getting truncated somewhere along the way - I'll need to do some digging there. Error executing tool. Export Web Map Task : ERROR 000735: Web Map as JSON: Value is required The value is empty. The value is empty. ERROR 000735: Web Map as JSON: Value is required
... View more
08-22-2017
03:53 PM
|
0
|
0
|
1128
|
POST
|
Thanks, Robert. To be perfectly honest, this is my first time using the print widget. Can you point to where this specific behavior is documented? I didn't seem to come across that mentioned anywhere. I don't doubt that I'm seeing intended behavior, but it does seem like a sub-optimal (though arguably more generic) use of the API so I'm wondering if there are hooks for either intercepting the built JSON or otherwise configuring what get's sent to the server. In my case I may need to find a workaround or else effectively rebuild the print widget from scratch...
... View more
08-22-2017
03:19 PM
|
0
|
2
|
1128
|
POST
|
I'll apologize upfront for the cross post - this has also been asked here. If cross posting is frowned upon I'll be happy to take this down. I'm using a print widget to get exports of a map view. My view has a number of layers, one of them is a feature layer (in this case, showing US ZIP codes). When I look at the ExportWebMap specification it looks like the syntax for feature layers, I should be able to simply provide object IDs for the features that ought to be displayed in the export. However, when I look at the JSON that's sent to the export service's execute task I see that my feature layer was instead treated as a collection of client side graphics - with full geometries listed instead of object IDs. Aside from being slow this also causes the export operation to crash when my request payload gets too large. Any insight as to why my FeatureLayer features might be getting serialized as client side graphics? I'm using version 4.4 of the ArcGIS API for JavaScript.
... View more
08-22-2017
12:43 PM
|
0
|
13
|
1847
|
POST
|
Here's an easy way to reproduce what I'm talking about - just assign this function to your base map's mapClick event and turn on your favorite map service layer.
private function myMap_ClickHandler(event:MapMouseEvent):void {
[INDENT]// Initialize BitmapData to same size as map itself
var bmd:BitmapData = new BitmapData(myMap.width, myMap.height);
// Grab desired layer
var sl:ArcGISDynamicMapServiceLayer = myMap.getLayer("myServiceLayerId") as ArcGISDynamicMapServiceLayer;
// Draw layer to BitmapData
bmd.draw(sl);
// Convert BitmapData to a ByteArray
var encoder:JPEGEncoder = new JPEGEncoder(100);
var ba:ByteArray = encoder.encode(bmd);
// Save our ByteArray locally as an image for inspection
var fr:FileReference = new FileReference();
fr.save(ba, "MyServiceLayer.jpg");[/INDENT]
}
Here's an example of output generated on my machine using a zip codes layer: Zip Codes at initial state Zip Codes after pan I simply added the zip codes layer to my map - clicked and saved the drawn layer, then panned southwest and clicked to save again. As you can see the only part of the second image that is not whited out is that which was in the initial image - and, interestingly enough, it's still in the bottom left of the generated image rather than the top right as it is on screen. If anybody could confirm this behavior or point out where I'm going astray I'd much appreciate it.
... View more
09-29-2011
05:39 AM
|
0
|
0
|
108
|
POST
|
I have a customized InfoWindow which shows data for all visible layers in a nice tree structure such that each visible service has its own branch in the tree and each layer in that service has a leaf under that branch. What I'd like to do is have the color of those layer leaf icons match the corresponding visible layers at the clicked point. I've been going about this by drawing the layer itself to a BitmapData object and grabbing a pixel from the location matching the users click on the map - then using that pixel to color the tree icon. This seems to work fine as long as the map position remains unchanged, which is to say once I start panning/zooming I run into problems. Namely - when drawing the layers to a bitmap object after a pan I can't see anything from parts of the map that were not in the view when it initially loaded, the newly visible areas just show up as white space. I've tried performing a validateNow() on everything from the layer itself to the entire map. I've also tried invoking refresh() on the layer before drawing it with no luck. Any ideas? I'm also open to other suggestions for getting the color of a layer at a clicked point.
... View more
09-28-2011
11:38 AM
|
0
|
1
|
1051
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|