Export Web Map

701
2
07-08-2013 05:04 AM
EduardoCarvalho
New Contributor
Hi,

I want to send an image of point location by email and I thought to use the Export Web Map for to get the URL of image, but when I create the Web Map as JSON, the Top Level "operationalLayers" doesn't work, anything happens no matter what I change, the point doesn't show.


Somebody can help me about this.

{
     "mapOptions":{
          "extent":{
      "xmin":-146.637095,
      "ymin":-33.555195,
      "xmax":166.625186,
      "ymax":23.54715,
               "spatialReference":{
                    "wkid":4326                 
      }            
    },
          "scale":123456789.10,
          "spatialReference":{
               "wkid":4326            
    }       
  },
     "operationalLayers":{
          "featureCollection":{
               "layers":[
                            {
                         "layerDefinition":{
                              "geometryType":"esriGeometryPoint"                           
          },
                         "featureSet":{
                              "features":[
                                                 {
                                        "geometry":{
                                             "x":-46.637096,
                                             "y":-23.54715,
                                             "spatialReference":{
                                                  "wkid":4326                                               
                  }                                          
                },
                "symbol":{
                  "type":"esriSMS",
                  "style":"esriSMSCircle",
                  "color":[
                    76,
                    115,
                    0,
                    255
                  ],
                  "size":2000,
                  "outline":{
                    "color":[
                      152,
                      230,
                      0,
                      255
                    ],
                    "width":1
                  }
                }                                     
              }                                
            ]                           
          }                      
        }                 
      ]            
    }       
  },
  "baseMap":{
    "baseMapLayers":[
      {
        "url":"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
      }
    ]
  },
     "exportOptions":{
          "dpi":80,
          "outputSize":[
      800,
      500
    ]       
  }
}
0 Kudos
2 Replies
JohnGravois
Frequent Contributor
after comparing and contrasting your webmap json with the printParameters passed by our print widget sample, i was able to get valid output, by making the following changes


1. substituted the url of a WGS84 tiled map service (more appropriate since you utilize that coordinate system in your json
2. decreased the symbol size from 2000 to 20
3. added "geometryType" to the tags within featureSet (spec says its optional)
4. moved the tiled map service layer into "operationalLayers (spec indicates it should work either way)
0 Kudos
EduardoCarvalho
New Contributor
jgravois,

very thankful
0 Kudos