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.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.