Asking

2315
1
03-08-2016 01:45 AM
ThanhtikeooDOM
New Contributor

I would like to combine the data in two shape file. I cannot combine and I don't know what happen. Please explain me how can I do.

Thanks to all.

Than Htike Oo

0 Kudos
1 Reply
RobertMueller_Jr1
New Contributor III

Than-

I might reference you to Larry Zhang's comment on this question (How can I merge features in ArcGIS Online? ). I haven't found a way yet to do this programmatically. I would probably suggest the Analysis Widget. If you want to do this programmatically through (via the Spatial Analysis Service, i.e. still uses credits) check out this from ESRI Development support;

developer-support/web-js/merge-layers-tool at master · Esri/developer-support · GitHub

-Bob

var mergeLayersTool = new MergeLayers({

  inputLayer: inputLayer,

  mergeLayers: [mergeLayer],

  map: map,

  outputLayerName: "MyTestLayer",

  portalUrl: "http://www.arcgis.com",

  showHelp: true,

  showSelectFolder: true

}, "merge");

mergeLayersTool.startup();

mergeLayersTool.on("job-result", function(result) {

   map.removeLayer(inputLayer);

   map.removeLayer(mergeLayer);

   map.addLayer(new FeatureLayer(result.value.url));

});

0 Kudos