AnsweredAssumed Answered

Unable to Disable InfoTemplate When Editing

Question asked by jskinner-esristaff Employee on Jun 13, 2013
Latest reply on Jun 18, 2013 by jskinner-esristaff
I have an application where I would like to be able to set an infoTemplate for a feature service, and be able to edit the same feature service.  I created two buttons, 'Start Editing' and 'Stop Editing'.  When the application loads, editing is initialized but I have the editor template hidden.  The infoTemplate is also set.  The 'Start Editing' button sets the infoTemplate to NULL and shows the editor template.  The 'Stop Editing' button hides the editor template, and sets the infoTemplate for the feature service.

Once the application loads, I can click 'Start Editing' and begin adding/updating/deleting features.  Once I click 'Stop Editing', the infoTemplate shows when clicking a feature.  However, if I click 'Start Editing' again, I can no longer update or delete a feature.  The infoTemplate displays rather than the AttributeInspector.  The same occurs when trying to add a new feature.

Is it possible to use an infoTemplate and edit a feature service?  Below is the code I am using with the Javascript API 3.4:

var editorWidget;  function startEditing(){     map.infoWindow.hide();     disableFeatureLayerPopups();         dijit.byId("editorDiv").domNode.style.display = 'block'; }  function stopEditing(){         dijit.byId("editorDiv").domNode.style.display = 'none';     enableFeatureLayerPopups(); }  function disableFeatureLayerPopups() {     map.infoWindow.hide();     if (map.getLayer("pointData")) {         map.getLayer("pointData").setInfoTemplate(null);     } }  function enableFeatureLayerPopups() {     map.infoWindow.resize(200,125);     if (map.getLayer("pointData")) {         map.getLayer("pointData").setInfoTemplate(infoTemplate1);     }   }      function initEditing(results) {         var featureLayerInfos = dojo.map(results, function(result) {           return {             "featureLayer": result.layer           };         });          var settings = {           map: map,           layerInfos: featureLayerInfos         };         var params = {           settings: settings         };                  editorWidget = new esri.dijit.editing.Editor(params, 'editorDiv');                  var options = {snapKey:dojo.keys.copyKey};         map.enableSnapping(options);                  editorWidget.startup(); }

Outcomes