var template = new PopupTemplate({ title: "My Title", fieldInfos: [ {fieldName: "Address", label: "<b>Address:</b>", visible: true}, {fieldName: "City_1", label: "<b>City:</b>", visible: true}], showAttachments:true, }); var featureLayer = new FeatureLayer("myurl/FeatureServer/15",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], infoTemplate:template });
Map services do not support adding, updating, or deleting attachments. You'll need a feature service to perform these operations. However, you can query attachment information from a map service through the Attachment Infos resource (see the REST API topic here, under Map Service > Dynamic Layer/Table > Feature > Attachment Infos). Hope this helps.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.