0

I am using ArcGIS javascript API 3.11 so as to call a map export service (printTask). This used to work fine, until I decided to print a graphics layer with a scaleDependentRenderer. The scaleDependentRenderer is created by reusing the renderers (which are of type UniqueValueRenderer) of specific layers that belong to a published map service.
As I can see the WebMapAsJson (map definition), is not properly filled when it comes to the the graphics layer, since it misses the "drawingInfo" (is empty) and "fieds" properties from the layerDefinition. You can check the attached image of the map json, as it was spoofed from the browser network. Any Ideas why the map export does not work properly with the scale dependent render? Here is how I am applying the ScaleDependentRenderer which works fine as well: enter image description here

Also, for the record, according to my custom print implementation I am retrieving the map definition (Web_Map_as_JSON) using the command:

    var printTask = new esri.tasks.PrintTask(angular.element("body").scope().properties.mapExportService);
    var Web_Map_as_JSON = JSON.toJson(printTask._getPrintDefinition($scope.map));

In turn I submit the map details to my map export service using estiRequest:

requestHandle = esriRequest({
                                    url: angular.element("body").scope().properties.mapExportService,
                                    content: {
                                        f: 'json',
                                        Web_Map_as_JSON: Web_Map_as_JSON,
                                        Format: format,
                                        Layout_Template: layout
                                    },
                                    handleAs: 'json',
                                    callbackParamName: 'callback',
                                }, {
                                    usePost: true
                                });

Web_Map_as_JSON consructed when I'm pressing print.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.