dojo.require("esri.dijit.editing.AttachmentEditor");
Description
(Added at v2.0)
Widget that supports viewing attachments for feature layers that have attachments enabled. If the feature layers are from a feature service then the attachment editor will include the ability to create, view and delete attachments.
Samples
Search for
samples that use this class.
Constructors
Methods
Constructor Details
Creates a new AttachmentEditor object.
Parameters:
<Object > params |
Required |
No parameter options. |
<Node | String > srcNodeRef |
Required |
HTML element where the widget is rendered. |
Sample:
map.infoWindow.setContent("<div id='content' style='width:100%'></div>");
map.infoWindow.resize(350,275);
var attachmentEditor = new esri.dijit.editing.AttachmentEditor({}, dojo.byId("content"));
attachmentEditor.startup();
Method Details
Display the attachment editor.
Parameters:
<Graphic > graphic |
Required |
Graphic, with attachments, to display in the attachment editor. |
<FeatureLayer > featureLayer |
Required |
The feature layer to display attachments for. The feature layer must have attachments enabled. |
Sample:
dojo.connect(featureLayer, "onClick", function(evt) {
//display the attachment editor in the map's info window.
attachmentEditor.showAttachments(evt.graphic,featureLayer);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
});
Finalizes the creation of the attachment editor. Call startup() after creating the widget when you are ready for user interaction.