function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent; var deferred = identifyTask.execute(identifyParams); deferred.addCallback(function (response) { return dojo.map(response, function (result) { var feature = result.feature; feature.attributes.layerName = result.layerName; if (result.layerName === 'signs') { //console.log(feature.attributes.OBJECTID); var template = new esri.InfoTemplate(); var contentString = ""; contentString += "<tr><font color='blue'><b>Photo:</b><br/><img src=files/${AA_SIGN1} alt='Photo not yet available at this location' width='200' height='200'</tr></td><br>"; contentString += "<tr><font color='blue'><b>Photo:</b><br/><img src=files/${AA_SIGN2} alt='Photo not yet available at this location' width='200' height='200'</tr></td><br>"; contentString += "<tr><font color='blue'><b>Layer Name: </b><font color='black'><td>${layerName}</tr></td><br>"; contentString += "<tr><font color='blue'><b>AA_SIGN1: </b><font color='black'><td><a target='_blank' href=files/${AA_SIGN1}>${AA_SIGN1}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>AA_SIGN2: </b><font color='black'><td><a target='_blank' href=files/${AA_SIGN2}>${AA_SIGN2}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>AB_FOOT1: </b><font color='black'><td><a target='_blank' href=files/${AB_FOOT1}>${AB_FOOT1}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>AB_FOOT2: </b><font color='black'><td><a target='_blank' href=files/${AB_FOOT2}>${AB_FOOT2}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>AC_BOLT1: </b><font color='black'><td><a target='_blank' href=files/${AC_BOLT1}>${AC_BOLT1}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>AC_BOLT2: </b><font color='black'><td><a target='_blank' href=files/${AC_BOLT2}>${AC_BOLT2}</a></tr></td><br>"; contentString += "<tr><font color='blue'><b>InspDoc1: </b><font color='black'><td><a target='_blank' href=files/${InspDoc1}>${InspDoc1}</a></tr></td><br>"; template.content = contentString; feature.setInfoTemplate(template); }
Thanks for the reply, but I'm trying to get images that are attachments from ArcGIS Server. I can use queryAttachmentInfos and get an array that includes the url to a page that has the image (example: "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0/6070527/attachments/467") and the name of the image, but I'm trying to figure out A) how to get a link that I can use for a src tagand How to show all the images in a popup.For B I've been monkeying around with a dojox.image.slideshow, but I'm having trouble populating the slideshow object (actually the itemFileReadStore). Any help would be appreciated.-Brendan
HTTP/1.1 200 OK Content-Disposition: attachment; filename="5366266854_2165ce65f9_z.jpg"; Date: Wed, 10 Apr 2013 17:23:00 GMT ETag: -817967711 Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Content-Length: 32349 Connection: keep-alive
"<b>Control Station:</b> <a target='_blank' href=http://pathto/attachments/scans/${Corner Point Identifier}.pdf>${Corner Point Identifier}</a>"
map.getLayer(devPlanLayerID).queryAttachmentInfos(objectId, function (infos) { if (infos.length > 0) { var itemJson = []; var len = infos.length; for (var i = 0; i < len; i++) { itemJson.push({ url: infos.url, type: infos.contentType, name: infos.name }); } var data = { identifier: "name", items: itemJson }; var itemNameMap = { imageLargeAttr: "url", imageThumbAttr: "url", titleAttr: "name" }; var itmFileReadStore = new dojo.data.ItemFileReadStore({ data: data }); dijit.byId('gallery1').setDataStore(itmFileReadStore, { query: {}, count: 1 }, itemNameMap); } })
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.