Select to view content in your preferred language

Place Info Window in Div with Editor Widget

952
5
Jump to solution
09-19-2012 09:24 AM
MeleKoneya
Regular Contributor
I am using the editor widget to add features to SDE feature classes via an ArcGIS Server Feature Server, but have found the infowindow used by the editor widget to be cumbersome because it displays on top of the map. 

I would like to use a Div outside of the map to contain the infowindow contents used by the Editor widget.  

Does anyone have some code that shows how to use to redirect the infowindow used when editing to a location other than in the map div HTML element?

Thanks,

Mele
0 Kudos
1 Solution

Accepted Solutions
CharmaleeSandanayake
New Contributor III
0 Kudos
5 Replies
KellyHutchins
Esri Frequent Contributor
You can do this by creating an attribute inspector and specifying the div where you want the attributes to display.

        var attInsp = new esri.dijit.AttributeInspector({
          layerInfos:featureLayerInfos
        },'attrDiv');


Next set the attribute inspector you created to the attributeInspector option when creating the Editor:

   var settings = {
          map: map,
          attributeInspector:attInsp,
          layerInfos: featureLayerInfos
        };

        var params = {
          settings: settings
        };

        editorWidget = new esri.dijit.editing.Editor(params, 'editorDiv');


After making those changes if you run your app you'll see that the attributes display in the location you specified. However due to a bug you'll also see an empty info window appear. We'll fix this asap but you can workaround this by adding the following:
   
    
        dojo.connect(map.infoWindow, 'onShow',function(){
          map.infoWindow.hide();
        });


I've attached a working sample.
0 Kudos
MeleKoneya
Regular Contributor
Kelly,
Thanks for your code.    This works great and is what I was looking for.
Mele
0 Kudos
MeleKoneya
Regular Contributor
This worked great, but if I don't have the Editor widget and I am using just the AttributeInspector like in this sample:

http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/ed_attribute_inspector.html

How can I place the AttributeInspector in a DIV that is not on the Map?

Thanks,

Mele
0 Kudos
CharmaleeSandanayake
New Contributor III
This sample just uses the attribute inspector and places it in a div:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/widget_attributeinspectorpane.html
0 Kudos
MeleKoneya
Regular Contributor
Charmalee,

Thanks for the sample.    This looks like just what I needed.  

Mele
0 Kudos