Select to view content in your preferred language

Cannot get pop-up with hyperlinked photos to show up in 3.4

2484
6
Jump to solution
08-30-2013 04:31 PM
TimHayes
Frequent Contributor
I have successfully configured the pop ups for all my layers except the one that has photos.

I am not using the AppBuilder. I want to do this using XML, not the AppBuilder.

Photo_1 below is the field in the Feature Class where the photos reside. Layer type = dynamic, not Feature.

I am pretty sure Photo_1 placement is the wrong syntax. Where do I specify the name of the attribute field where all the names of the photos reside in the Feature Class?

When I click on any of the points in this layer, nothing pops up.

Any ideas on how to get this to work?

Here is my code from the pop up.xml file associated with this layer:

<?xml version="1.0" ?>
<configuration>
    <title>Photo of Buried Utilities</title>
    <description><![CDATA[<b>Date of Photo: </b> {GPS_Date}]]></description>
    <medias>
        <media type="image" imageLinkURL="http://<servername>/<virtualdirectory>/{Photo_1}"/>
    </medias>
</configuration>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Tim,

   Here is an example of the proper format for getting images in popups (this is tested and working in 3.4):

<?xml version="1.0" ?> <configuration>     <title>{DESCRIPTION}</title>     <description> <![CDATA[<p><b>Description: </b>{DESCRIPTION}</p><p><b>Online: </b>{ONLINE}</p><p><b>Last updated: </b>{LAST_UPDATED}</p>]]>     </description>          <fields>         <field name="DESCRIPTION" visible="false"/>                         <field name="ONLINE" visible="false"/>                <field name="LAST_UPDATED" visible="false">             <format dateformat="shortDate"/>         </field>           <field name="URL" visible="false"/>     </fields>     <medias>         <media type="image" caption="Latest Image {LAST_UPDATED} online: {ONLINE}" imagesource="{URL}" imagelink="{URL}"/>     </medias> </configuration>  <!--     Pop-up configuration file for:     http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/2 -->

View solution in original post

0 Kudos
6 Replies
TimHayes
Frequent Contributor
I have successfully configured the pop ups for all my layers except the one that has photos.

I am not using the AppBuilder. I want to do this using XML, not the AppBuilder.

Photo_1 below is the field in the Feature Class where the photos reside. Layer type = dynamic, not Feature.

I am pretty sure Photo_1 placement is the wrong syntax. Where do I specify the name of the attribute field where all the names of the photos reside in the Feature Class?

When I click on any of the points in this layer, nothing pops up.

Any ideas on how to get this to work?

Here is my code from the pop up.xml file associated with this layer:

<?xml version="1.0" ?>
<configuration>
    <title>Photo of Buried Utilities</title>
    <description><![CDATA[<b>Date of Photo: </b> {GPS_Date}]]></description>
    <medias>
        <media type="image" imageLinkURL="http://<servername>/<virtualdirectory>/{Photo_1}"/>
    </medias>
</configuration>


I think this could be a bug that should be fixed in 3.5 release?

http://support.esri.com/en/bugs/nimbus/TklNMDkyOTM2
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   Here is an example of the proper format for getting images in popups (this is tested and working in 3.4):

<?xml version="1.0" ?> <configuration>     <title>{DESCRIPTION}</title>     <description> <![CDATA[<p><b>Description: </b>{DESCRIPTION}</p><p><b>Online: </b>{ONLINE}</p><p><b>Last updated: </b>{LAST_UPDATED}</p>]]>     </description>          <fields>         <field name="DESCRIPTION" visible="false"/>                         <field name="ONLINE" visible="false"/>                <field name="LAST_UPDATED" visible="false">             <format dateformat="shortDate"/>         </field>           <field name="URL" visible="false"/>     </fields>     <medias>         <media type="image" caption="Latest Image {LAST_UPDATED} online: {ONLINE}" imagesource="{URL}" imagelink="{URL}"/>     </medias> </configuration>  <!--     Pop-up configuration file for:     http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/2 -->
0 Kudos
TimHayes
Frequent Contributor
Tim,

   Here is an example of the proper format for getting images in popups (this is tested and working in 3.4):

<?xml version="1.0" ?>
<configuration>
    <title>{DESCRIPTION}</title>
    <description>
<![CDATA[<p><b>Description: </b>{DESCRIPTION}</p><p><b>Online: </b>{ONLINE}</p><p><b>Last updated: </b>{LAST_UPDATED}</p>]]>
    </description>     
    <fields>
        <field name="DESCRIPTION" visible="false"/>                
        <field name="ONLINE" visible="false"/>       
        <field name="LAST_UPDATED" visible="false">
            <format dateformat="shortDate"/>
        </field>  
        <field name="URL" visible="false"/>
    </fields>
    <medias>
        <media type="image" caption="Latest Image {LAST_UPDATED} online: {ONLINE}" imagesource="{URL}" imagelink="{URL}"/>
    </medias>
</configuration>

<!--
    Pop-up configuration file for:
    http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/2
-->


I understand now. What confused me was the previous way I hyperlinked photos like: imagelink=//<servername>/<virtualdirectory>/
This method allows me to NOT add the entire path into the attribute field of the feature class + the filename.jpg. In other words, in my hyperlink field in the attribute table all I would need is the filename.jpg. No path needed since this would be specified in imagelink.

Seems like because of this bug, until they get it fixed, to hyperlink to images, you must include the entire path + imagename.jpg in the attribute field. Thus, the code would be imagelink = "{URL}"

Where URL is the field name, within which includes the virtual URL and filename with jpg/png/tiff at the end.

When I speak of path, I mean the one that you set in your IIS Virtual Directory to point to the location of the your files. Use this path.

I thought I would try and explain it a different way for the benefit of others, maybe.



I got the image hyperlinks to work.

thanks again!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   I am still not sure what is going wrong on your end as using 3.4 I can get this to work, just fine (The URL field only has the image name and extension):

<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
    <description>
        <![CDATA[<p><b>Parcel Address: </b>{ADDRESS_3}</p><p><b>Owner Name: </b>{NAME}</p><p><b>Parcel Number: </b>{PARCEL_NUMBER}</p>]]>
    </description>
    <fields>
        <field name="ADDRESS_3" visible="false"/>
        <field name="NAME" visible="false"/>
        <field name="PARCEL_NUMBER" visible="false"/>
        <field name="URL" visible="false"/>
    </fields>
    <medias>
        <media type="image" caption="Image PPIN {PPIN}" imagesource="http://gislap183/Assets/Images/{URL}" imagelink="http://gislap183/Assets/Images/{URL}"/>
    </medias>
</configuration>
0 Kudos
TimHayes
Frequent Contributor
In the attribute field of the Feature Class where the name of the JPG is, it did not have the entire URL + filename. It only had the filename, for example: photo123.jpg.

I added the URL + filename in the field, for example: http://servername/foldername/photo123.jpg and the hyperlinked photos appears in the map viewer no problem.

Your responses moved me in the right direction. Now it works, even better than the now retired Info Widget
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   Glad you got it to work. In my last post I just wanted you to know that I got it working both ways. With the full url and with JUST the image name in the attribute field. The bug with the Query Widget does  not seem to be applicable to the popups.
0 Kudos