Select to view content in your preferred language

Show attachments in InfoTemplate for jQuery Mobile

3031
2
03-31-2015 06:54 AM
RobertKirkwood
Occasional Contributor III

How do you get the attachments to show in the InfoWindow for this example? I can see them when you create a point, but when you identify the point it is not there.

https://developers.arcgis.com/javascript/jssamples/mobile_citizenrequest.html

If the code is modified on line 693 to  "showAttachments": true, then the window when collecting a point looks like this:

Capture.JPG

I would like the Attachments to show up in the identify window as well.

The template is being created by this code:

var featureLayerInfoTemplate = new InfoTemplate();
                        featureLayerInfoTemplate.setTitle("<b>Secies Type: ${SpeciesType:speciesDomainLookup}</b>");
                        var infoTemplateContent = 
                                "<span class=\"infoTemplateContentRowLabel\">Date: </span><span class=\"infoTemplateContentRowItem\">${sampDate:DateFormat}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Species Type: </span><span class=\"infoTemplateContentRowItem\">${SpeciesType:speciesDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Common Name: </span><span class=\"infoTemplateContentRowItem\">${commonName:commonNameDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Phenology: </span><span class=\"infoTemplateContentRowItem\">${plantPhenology:phenologyDomainLookup}</span><br>" +\

                                "<span class=\"infoTemplateContentRowLabel\">Habitat: </span><span class=\"infoTemplateContentRowItem\">${Habitat:habitatDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Weather: </span><span class=\"infoTemplateContentRowItem\">${Weather:weatherTypeDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Is Sensitive?: </span><span class=\"infoTemplateContentRowItem\">${IsSensitive:sensitiveTypeDomainLookup}</span>";
                        featureLayerInfoTemplate.setContent(infoTemplateContent);

That code does not specify whether or not attachments are visible. I want to be able to see the attachment manager in that window.

0 Kudos
2 Replies
YousefQuran
Occasional Contributor

You can find it simply by clicking the right arrow on the InfoWindow which is located on most right of the InfoWindow.

Untitled.png

-Yusuf

Amman, Jordan.

RobertKirkwood
Occasional Contributor III

The attachments do not show up in that info window. The template is being created by this code:

var featureLayerInfoTemplate = new InfoTemplate();
                        featureLayerInfoTemplate.setTitle("<b>Secies Type: ${SpeciesType:speciesDomainLookup}</b>");
                        var infoTemplateContent = 
                                "<span class=\"infoTemplateContentRowLabel\">Date: </span><span class=\"infoTemplateContentRowItem\">${sampDate:DateFormat}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Species Type: </span><span class=\"infoTemplateContentRowItem\">${SpeciesType:speciesDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Common Name: </span><span class=\"infoTemplateContentRowItem\">${commonName:commonNameDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Phenology: </span><span class=\"infoTemplateContentRowItem\">${plantPhenology:phenologyDomainLookup}</span><br>" +\

                                "<span class=\"infoTemplateContentRowLabel\">Habitat: </span><span class=\"infoTemplateContentRowItem\">${Habitat:habitatDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Weather: </span><span class=\"infoTemplateContentRowItem\">${Weather:weatherTypeDomainLookup}</span><br>" +
                                "<span class=\"infoTemplateContentRowLabel\">Is Sensitive?: </span><span class=\"infoTemplateContentRowItem\">${IsSensitive:sensitiveTypeDomainLookup}</span>";
                        featureLayerInfoTemplate.setContent(infoTemplateContent);

That code does not specify whether or not attachments are visible. I want to be able to see the attachment manager in that window.

0 Kudos