Skip to content

Instantly share code, notes, and snippets.

@Leandermen
Created April 16, 2019 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leandermen/b2b5392686f732ac258edc5dbb02222b to your computer and use it in GitHub Desktop.
Save Leandermen/b2b5392686f732ac258edc5dbb02222b to your computer and use it in GitHub Desktop.
Example WMAJ specification used in Custom Print Service
{
"mapOptions":{
"showAttribution":true,
"extent":{
"xmin":-7932860.715436569,
"ymin":-3719320.3145854347,
"xmax":-7918403.853189512,
"ymax":-3712673.967959408,
"spatialReference":{
"wkid":102100,
"latestWkid":3857
}
},
"spatialReference":{
"wkid":4326
},
"scale":40000,
"time":[
1555470000000,
1555470000000
]
},
"operationalLayers":[
{
"id":"layer1",
"title":"layer1",
"opacity":1,
"minScale":0,
"maxScale":0,
"url":"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
},
{
"id":"drawGraphics_point",
"opacity":1,
"minScale":0,
"maxScale":0,
"featureCollection":{
"layers":[
{
"layerDefinition":{
"name":"pointLayer",
"geometryType":"esriGeometryPoint",
"drawingInfo":{
"renderer":{
"type":"simple",
"label":"Puntos del usuario",
"description":"Puntos del usuario",
"symbol":{
"color":[
255,
0,
0,
255
],
"size":7.5,
"angle":0,
"xoffset":0,
"yoffset":0,
"type":"esriSMS",
"style":"esriSMSCircle",
"outline":{
"color":[
255,
0,
0,
255
],
"width":0.75,
"type":"esriSLS",
"style":"esriSLSSolid"
}
}
}
}
},
"featureSet":{
"geometryType":"esriGeometryPoint",
"features":[
{
"geometry":{
"x":-7928747.093215657,
"y":-3714812.3673340026,
"spatialReference":{
"wkid":102100,
"latestWkid":3857
}
}
}
]
}
}
]
}
},
{
"id":"drawGraphics_buffer",
"opacity":1,
"minScale":0,
"maxScale":0,
"featureCollection":{
"layers":[
{
"layerDefinition":{
"name":"polygonLayer",
"geometryType":"esriGeometryPolygon",
"drawingInfo":{
"renderer":{
"type":"simple",
"label":"Buffers del usuario",
"description":"Buffers del usuario",
"symbol":{
"color":[
255,
0,
0,
26
],
"outline":{
"color":[
255,
0,
0,
166
],
"width":1.5,
"type":"esriSLS",
"style":"esriSLSSolid"
},
"type":"esriSFS",
"style":"esriSFSSolid"
}
}
}
},
"featureSet":{
"geometryType":"esriGeometryPolygon",
"features":[
{
"geometry":{
"rings":[
[
[
-7928747.093215657,
-3713812.3673340026
],
[
-7928718.921224625,
-3713812.7642433103
],
[
-7928690.771597043,
-3713813.95465616
],
[
-7928662.666678611,
-3713815.9376275796
],
[
-7928634.628779535,
-3713818.7115834495
],
[
-7928606.680156822,
-3713822.274321751
],
[
-7928747.093215657,
-3713812.3673340026
]
]
],
"spatialReference":{
"wkid":102100,
"latestWkid":3857
}
}
}
]
}
}
]
}
},
{
"id":"mapCenter_graphics",
"opacity":1,
"minScale":0,
"maxScale":0,
"featureCollection":{
"layers":[
{
"layerDefinition":{
"name":"pointLayer",
"geometryType":"esriGeometryPoint"
},
"featureSet":{
"geometryType":"esriGeometryPoint",
"features":[
{
"geometry":{
"x":-7925632.284313041,
"y":-3715997.1412724215,
"spatialReference":{
"wkid":102100,
"latestWkid":3857
}
},
"symbol":{
"color":[
0,
0,
0,
0
],
"size":9,
"angle":0,
"xoffset":0,
"yoffset":0,
"type":"esriSMS",
"style":"esriSMSSquare",
"outline":{
"color":[
0,
0,
0,
0
],
"width":0.75,
"type":"esriSLS",
"style":"esriSLSSolid"
}
}
}
]
}
}
]
}
}
],
"exportOptions":{
"outputSize":[
1650,
1275
],
"dpi":150
},
"layoutOptions":{
"titleText":"Mapa Visor",
"authorText":"Yo",
"copyrightText":"Copyright 2017",
"scaleBarOptions":{
"metricUnit":"esriKilometers",
"metricLabel":"km",
"nonMetricUnit":"esriMiles",
"nonMetricLabel":"mi"
},
"legendOptions":{
"operationalLayers":[
{
"id":"drawGraphics_point"
},
{
"id":"drawGraphics_buffer"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment