Thank U
Drawing polygon in the following way and it is succcess.
I need to save polygon poins to DB . How can I get the polygin poins????
var symbol;
toolbar.deactivate();
map.showZoomSlider();
map.enableMapNavigation();
switch (evt.geometry.type) {
case "point":
case "multipoint":
symbol = new SimpleMarkerSymbol();
break;
case "polyline":
symbol = new SimpleLineSymbol();
break;
default:
symbol = new SimpleFillSymbol();
break;
}
var graphic = new Graphic(evt.geometry, symbol);
map.graphics.add(graphic);
Solved! Go to Solution.
Julie,
Something like this:
var poly = evt.geometry, pntArray = []; for (var i2 = poly.rings.length - 1; i2 >= 0; i2--) { for (var j1 = 0; j1 < poly.rings[i2].length; j1++) { var mp2 = poly.getPoint(i2, j1); pntArray.push(mp2); } }
Julie,
Something like this:
var poly = evt.geometry, pntArray = []; for (var i2 = poly.rings.length - 1; i2 >= 0; i2--) { for (var j1 = 0; j1 < poly.rings[i2].length; j1++) { var mp2 = poly.getPoint(i2, j1); pntArray.push(mp2); } }