I'm trying to add a feature (File Geodatabase) with an attached photo (raster file) from ArcMap to google earth. When i use the tool Layer to KML i get the feature but when i open the google earth file i can't view the photo attached to Google Earth. I attached a picture below
Geodatabase attachments are not exported to the KMZ. In order to view the image, you'd need to save the photo to a location that is web enabled and add they hyperlink of the image to a field in your feature class. Then you would need to modify the html popup xsl template in the layer properties to include a test for field values.
<xsl:when test="FieldValue[starts-with(., 'http://yourimageserver.com/image_directory/')]"> <a target="_blank"> <xsl:attribute name="href"><xsl:value-of select="FieldValue"/> </xsl:attribute> <img> <xsl:attribute name="src"> <xsl:value-of select="FieldValue"/> </xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="250"/> </xsl:attribute> </img> </a> </xsl:when>
The photo will show up in the html popup in ArcMap in the table provided the url base included in the XML test matches the beginning of the URLs for the photos. When exported to KMZ, the html popup should look the same in google earth. It will also hyperlink to the photo for full screen viewing.
I never tried this before and i'm a little bit confused could you explain what you mean when you say :
1)"you'd need to save the photo to a location that is web enabled and add they hyperlink of the image to a field in your feature class"
Where do i put that code ?
2) Then you would need to modify the html popup xsl template in the layer properties to include a test for field values.
Thank you in advance
Thanks alot