hi , please, i want to create a arcEngine function using .net that allow to do the same thing like (see picture): [ATTACH=CONFIG]27814[/ATTACH] select 2 polygons click merge please there is some one who can help !! sincerely
code <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Edit Fire Perimeters</title>
<!-- specify dojo configuration to parse dijits at load time --> <script>var dojoConfig = { parseOnLoad:true };</script> <!-- reference ArcGIS JavaScript API --> <script src="http://js.arcgis.com/3.7/"></script> <script> //require selection dijit dojo.require("esri.map"); dojo.require("esri.dijit.editing.Editor-all"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.form.CheckBox"); dojo.require("dijit.Toolbar"); dojo.require("esri.SnappingManager"); var map; var editorWidget; function init() { //This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic //for details on setting up a proxy page. esri.config.defaults.io.proxyUrl = "/proxy"; //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications. esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); map = new esri.Map("map", { basemap: "topo", center: [-117.535, 34.28], zoom: 12, slider: false }); dojo.connect(map, "onLayersAddResult", initEditor); var pointsOfInterest = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0",{ mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //QUERY_SELECTION is working as well outFields: ['*'] });
function initEditor(results) { //build the layer and field information for the layer, display the description field //using a text area. var layers = dojo.map(results, function(result) { var fieldInfos= dojo.map(result.layer.fields,function(field){ if(field.name === 'description'){ return {'fieldName': field.name,'label':'Details',stringFieldOption:esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA} } else{ return {'fieldName': field.name,'lable':field.alias} } }); return {featureLayer:result.layer,'fieldInfos':fieldInfos} });
editorWidget = new esri.dijit.editing.Editor(params,'editorDiv'); //Dojo.keys.copyKey maps to CTRL in Windows and CMD in Mac map.enableSnapping({snapKey:dojo.keys.copyKey}); //create a new checkbox to enable/disable snapping var checkBox = new dijit.form.CheckBox({ name: "chkSnapping", checked:true, id: "chkSnapping", label:"Snapping", showLabel:"false", title:"Snapping", onChange: function(evt) { console.log(this.checked); if(this.checked){ map.enableSnapping({snapKey:dojo.keys.copyKey}); } else { map.disableSnapping(); } } }); //add the snapping checkbox to the editor's toolbar var myToolbarElement = dojo.query(".esriDrawingToolbar",editorWidget.domNode)[0]; var myToolbar = dijit.byId(myToolbarElement.id);
myToolbar.addChild(new dijit.ToolbarSeparator()); myToolbar.addChild(checkBox); editorWidget.startup(); //listen for the template pickers onSelectionChange and disable //the snapping checkbox when a template is selected var templatePickerElement = dojo.query(".esriTemplatePicker",editorWidget.domNode)[0]; var templatePicker = dijit.byId(templatePickerElement.id); dojo.connect(templatePicker,"onSelectionChange",function(){ if (templatePicker.getSelected()) { //disable the snapping checkbox dijit.byId('chkSnapping').set("disabled",true); } else { dijit.byId('chkSnapping').set("disabled",false); } }); map.infoWindow.resize(325,200); } dojo.ready(init); </script> </head> <body class="claro"> <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline'" style="width:100%;height:100%;"> <div data-dojo-type="dijit.layout.ContentPane" id="header" data-dojo-props="region:'top'">Editable Fire Map</div> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"></div> <div id="leftPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'left'"> <div id="templatePickerDiv"></div> <div id="editorDiv"> </div> </div> </div> </body> </html>