Export Web Map scales symbols

1135
2
Jump to solution
06-28-2017 01:38 AM
MathieuVillemont
New Contributor II

I'm exporting a web map containing some graphics using PNG symbols.

However the size of the symbols in the PDF varies from the web map.

Strange things is that the symbols size also changes if I choose a different scale (cf. 5000.png and 25000.png).

Each graphics is sent with this JSON format :

{
     "geometry": {
          "x": 152234.89785321,
          "y": 6216854.2413964,
          "spatialReference": {
               "wkid": 102100
          }
     },
     "attributes": {},
     "symbol": {
          "angle": 0,
          "xoffset": 0,
          "yoffset": 0,
          "type": "esriPMS",
          "url": "point_ref.png",
          "width": 12,
          "height": 12
     }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
1 Solution

Accepted Solutions
MathieuVillemont
New Contributor II

Hi Shan,

I actually did not want to modify my JSON manually so I ended up modifying my data block properties in the MXD : General > Reference scale: <None> and it works!

Thanks

View solution in original post

0 Kudos
2 Replies
shan_sarkar
Occasional Contributor III

Mathieu,

Have you tried using the following?

template.exportOptions = {
width: 500,
height: 400,
dpi: 96
};
template.format = "PDF";
template.layout = "MAP_ONLY";
template.preserveScale = true;

I hope this helps!

~Shan


~Shan
MathieuVillemont
New Contributor II

Hi Shan,

I actually did not want to modify my JSON manually so I ended up modifying my data block properties in the MXD : General > Reference scale: <None> and it works!

Thanks

0 Kudos