Hi, been researching this but I need someone to spell it out as it is very new for me!
I would like to click on a point with the HTML Popup tool which references a field in the table which contains a link on the server with an image. I'll provide a sample:
Layer Name & Location: \\GisServer\Projects\Test\Data\Trees.gdb\Trees (I can make this a shapefile if that is easier)
Table:
ID Name Link
1 Olive \\GisServer\Projects\Test\Images\Olive.jpg
2 Elm \\GisServer\Projects\Test\Images\Elm.jpg
3 Pine \\GisServer\Projects\Test\Images\Pine.jpg
Here is the code I began with. I know it is only pointing to one image on the server right now, "Olive.jpg". I would like to set it up so each point displays the image found in the "Link" field in the table. If anyone can fix the code for me it would be super duper awesome :) The attached image shows how I'd like it to display as each point is clicked. Just a sample of course!:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html>
<body>
<table border="1" width="300" cellpadding="5" cellspacing="0">
<tr bgcolor="#9cbce2">
<td>Field</td>
<td>Value</td>
</tr>
<xsl:for-each select="FieldsDoc/Fields/Field">
<tr>
<td>
<xsl:value-of select="FieldName"/>
</td>
<td>
<xsl:choose>
<xsl:when test="FieldName[starts-with(., 'Trees')]">
<xsl:variable name="imageName" select="FieldValue"/>
<img src="\\GisServer\Projects\Test\Images\Olive.jpg" width="160" height="140"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="FieldValue"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks!
Tiff
I would like to click on a point with the HTML Popup tool which references a field in the table which contains a link on the server with an image. I'll provide a sample:
Layer Name & Location: \\GisServer\Projects\Test\Data\Trees.gdb\Trees (I can make this a shapefile if that is easier)
Table:
ID Name Link
1 Olive \\GisServer\Projects\Test\Images\Olive.jpg
2 Elm \\GisServer\Projects\Test\Images\Elm.jpg
3 Pine \\GisServer\Projects\Test\Images\Pine.jpg
Here is the code I began with. I know it is only pointing to one image on the server right now, "Olive.jpg". I would like to set it up so each point displays the image found in the "Link" field in the table. If anyone can fix the code for me it would be super duper awesome :) The attached image shows how I'd like it to display as each point is clicked. Just a sample of course!:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<html>
<body>
<table border="1" width="300" cellpadding="5" cellspacing="0">
<tr bgcolor="#9cbce2">
<td>Field</td>
<td>Value</td>
</tr>
<xsl:for-each select="FieldsDoc/Fields/Field">
<tr>
<td>
<xsl:value-of select="FieldName"/>
</td>
<td>
<xsl:choose>
<xsl:when test="FieldName[starts-with(., 'Trees')]">
<xsl:variable name="imageName" select="FieldValue"/>
<img src="\\GisServer\Projects\Test\Images\Olive.jpg" width="160" height="140"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="FieldValue"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks!
Tiff