Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm diving into using the HTML popup in ArcGIS 10 and I'm trying to figure out how I can get an image to appear. I have a point file that contains the field "Coll" that has a image name with no extension ("100015"). All the images are stored in a directory ("T:\SEFIS2010_GVdata\SEFIS Video"). I can make an image appear in the popup using this XSL code

<xsl:when test="FieldName[starts-with(., 'Coll')]">
    <img src="T:\SEFIS2010_GVdata\SEFIS Video\100015.jpg"/>
</xsl:when>

but what is the syntax to append the directory, the FieldName, and the ".jpg" extension?

share|improve this question

3 Answers 3

When setting up the HTML popup, check "As a URL" and then fill out the info. For example, I created a map that had PDFs pop up when you clicked on a point. To do that, just put all the PDFs in one directory, make sure the field corresponds with the correct PDF file name, and then add ".pdf" for the suffix. This should work fine with your example, just format it for .jpg

share|improve this answer
    
Thanks, Matt, but that doesn't quite get me there. The image shows up in the Verify window, but the Identify dialog is not showing the image. And I'd like to see the other attributes of the point. –  kenbuja Mar 22 '12 at 18:51
up vote 2 down vote accepted

This was the code I ended up using inside one of the XSL samples.

<xsl:when test="FieldName[starts-with(., 'Coll')]">
    <xsl:variable name="imageName" select="FieldValue"/>
    <img src="T:\SEFIS2010_GVdata\SEFIS Video\{$imageName}.jpg" width="192" height="108"/>
</xsl:when>
share|improve this answer

If you enable attachments for the feature class and add the photo for every point you can then use the option to display HTML pop-up windows as a table of visible fields, feature class attachments will be displayed automatically as part of the pop-up window. Turn on the HTML popup in the Tools toolbar. When you click on the point you should get the image and all the attributes associated.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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