Select to view content in your preferred language

View Photo Popups in Related Table

2535
5
Jump to solution
10-18-2016 06:54 PM
TimHayes1
Deactivated User

I am using WAB 2.1.

I have a point layer.

I have hyperlinks to photos in a related table to the point layer.

QUESTION 1: What is the best way to view these photos as a popup thumbnail using WAB 2.1? meaning the user clicks on a point, and a thumbnail of the photo opens, then the user can click on the thumbnail and a larger, separate window opens.

QUESTION 2: What is the best way to view these photos as a link in a popup, not a thumbnail using WAB 2.1?

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tim,

  Adding related data in popups in the LL widget is not a configurable option, but you can manually add them.

Example:

        "popup": {
          "infoTemplates": [
            {
              "layerId": 1,
              "title": "ADT",
              "description": "{ADT} reading date: {Date_}<br> {relationships/1/Deed_Hyper}",
              "fieldInfos": [
                {
                  "fieldName": "Date_",
                  "label": "Date of Reading",
                  "visible": true
                },
                {
                  "fieldName": "ADT",
                  "label": "ADT",
                  "visible": true
                }, {
                  "fieldName": "relationships/1/Deed_Hyper",
                  "label": "Deed Hyperlink",
                  "visible": true
                }
              ],
              "showAttachments": false,
              "mediaInfos": [{
                "title": "Dee Image",
                "type": "image",
                "caption": "",
                "value": {
                  "sourceUrl": "relationships/1/Deed_Hyper",
                  "linkUrl": "relationships/1/Deed_Hyper"
                }
              }]
            }
          ]
        },‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Tim,

   It is all done at WebMap level in AGOL.

TimHayes1
Deactivated User

Thanks, Robert. But, my WebMap is in WAB Developer Edition 2.1 on my local server. I am not using AGOL. Is there a way to do this on a local WebMap using the WAB Developer Edition 2.1?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

   So you are saying that the layer you want the popup and related data for is coming from the Local Layer widget?

0 Kudos
TimHayes1
Deactivated User

Yes, it is a Point Layer in the Local Layer Widget. This layer is stored in a File Geodatabase on my local server. 

I added it as a Dynamic Layer. 

The photos are in a separate table related to the Point Layer via a Relationship Class in the File Geodatabase. 

I looked at the Local Layer Widget - Edit Dynamic Layer and it only shows a Show Attachments Box. I check this box and the photos do not show up.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tim,

  Adding related data in popups in the LL widget is not a configurable option, but you can manually add them.

Example:

        "popup": {
          "infoTemplates": [
            {
              "layerId": 1,
              "title": "ADT",
              "description": "{ADT} reading date: {Date_}<br> {relationships/1/Deed_Hyper}",
              "fieldInfos": [
                {
                  "fieldName": "Date_",
                  "label": "Date of Reading",
                  "visible": true
                },
                {
                  "fieldName": "ADT",
                  "label": "ADT",
                  "visible": true
                }, {
                  "fieldName": "relationships/1/Deed_Hyper",
                  "label": "Deed Hyperlink",
                  "visible": true
                }
              ],
              "showAttachments": false,
              "mediaInfos": [{
                "title": "Dee Image",
                "type": "image",
                "caption": "",
                "value": {
                  "sourceUrl": "relationships/1/Deed_Hyper",
                  "linkUrl": "relationships/1/Deed_Hyper"
                }
              }]
            }
          ]
        },‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍