arcgis - How to Display Show Attachment in Info Window -


i using below code display identifier popup.if click on particular point display information point in info window(popup).but if specify show attachments true not display attachments.in map server have image points.so need display info window image.

 map.on("load", mapready);          var parcelsurl = "my map server";         //map.addlayer(new arcgisdynamicmapservicelayer(parcelsurl,         //  { opacity: 20 }));          function mapready() {             map.on("click", executeidentifytask);             //create identify tasks , setup parameters              identifytask = new identifytask(parcelsurl);              identifyparams = new identifyparameters();             identifyparams.tolerance = 3;             identifyparams.returngeometry = true;             identifyparams.layerids = [0];             identifyparams.layeroption = identifyparameters.layer_option_all;             identifyparams.width = map.width;             identifyparams.height = map.height;         }          function executeidentifytask(event) {             identifyparams.geometry = event.mappoint;             identifyparams.mapextent = map.extent;              var deferred = identifytask               .execute(identifyparams)               .addcallback(function (response) {                   // response array of identify result objects                   // let's return array of features.                   return arrayutils.map(response, function (result) {                       var feature = result.feature;                       var layername = result.layername;                        feature.attributes.layername = layername;                       if (layername === 'gridpoint') {                           var popuptemplate = new popuptemplate({                               title: "",                               fieldinfos: [                                 {                                     fieldname: "xx",                                     visible: true,                                     label: "xx"                                 },                                 {                                     fieldname: "yy",                                     visible: true,                                     label: "yy"                                  }                               ],                               showattachments: true                           });                           //var taxparceltemplate = new infotemplate("",                           //  "xx: ${xx} <br/> yy: ${yy} <br/> sample point number: ${sample point number} <br/> point collected: ${point collected} <br/>  major rabi crops: ${ major rabi crops} <br/> major summer crop: ${major summer crop} <br/> soil type: ${soil type} <br/> major kharif crops: ${major kharif crops}");                           feature.setinfotemplate(popuptemplate);                       }                       //else if (layername === 'grid') {                       //    console.log(feature.attributes.objectid);                       //    var buildingfootprinttemplate = new infotemplate("",                       //      "objectid: ${objectid}");                       //    feature.setinfotemplate(buildingfootprinttemplate);                       //}                        return feature;                   });               });              map.infowindow.setfeatures([deferred]);             map.infowindow.show(event.mappoint);         }        }); please me display attachments(image) in info window. 


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -