I'm tryin to draw rectangle based on extent object. Could someone look trought my code and Tell me what am I doing wrong?
var polygon = {
"geometry" : {
"rings" : [[[extent.xmin, extent.ymin],[extent.xmin, extent.ymax],[extent.xmax, extent.ymax],[extent.xmax, extent.ymin],[extent.xmin, extent.ymin]]],
"spatialReference" : {
"wkid" : 2180
}
},
"attributes" : {},
"symbol" : {
"color" : [0, 255, 0, 196],
"outline" : {
"color" : [0, 0, 0, 225],
"width" : 1.5,
"type" : "esriSLS",
"style" : "esriSLSSolid"
},
"type" : "esriSFS",
"style" : "esriSFSSolid"
}
};
var test = new esri.Graphic(polygon);
MAP.map.getLayer('identifyLayer').add(test);
I think that something is wrong with extent coordinates order, but I don't know how to fix it. Thanks!