0

I am using the configurable map viewer and I have fields in many of my layers that I want to use to link to documents with URLs.

Does anyone have any idea how I would do this out of the pop-up window?

I figure that I have to configure the identify.js file but I can't figure out how to accomplish what I want.

3 Answers 3

1

You can just enable hyperlinks under the display tab for the layer properties. Add a new value field and then paste the exact url link you want for each value. Select the feature with the hyperlink tool and the page should appear.

0

This is what it should look like:

yourID: {
            0: {
                title: 'YourTitle',
                description: '',
                    fieldInfos: [{
                    fieldName: 'value',
                    label: 'yourLabel',
                    visible: true
                }],
                  mediaInfos: [{
                     "title": "",
                     "caption": "",
                     "type": "image",
                     "value": {
                     "sourceURL": "{link}",
                     "linkURL": "{link}"
               }
             }]
         }
        }

I found the template here:

https://developers.arcgis.com/javascript/jshelp/intro_popuptemplate.html

0

Here's the way I do it using some simple HTML.

identifies: {
    zoning: {
        9: {
            title: 'Zoning',
            description: [
                '<table class="attrTable">',
                    '<tr valign="top">',
                        '<td class="attrName">Zoning:</td>',
                        '<td class="attrValue">{Zoning8}</td>',
                    '</tr>',
                    '<tr valign="top">',
                        '<td class="attrName">Zoning Ordinance:</td>',
                        '<td class="attrValue"><a href="http://www.cityofpetaluma.net/cdd/plan-zoning.html" target="_blank">Description</td>',
                    '</tr>',
                '</table>'
            ].join('')
        },

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.