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.
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 });
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.