BentleyMap V8i XFM-Hyperlink

Is it possible to have a feature property set to hyperlink in BentleyMap V8i XFM project?

I can only see simple text, rich text and combo box types.

Or should I use the Engineering links tool, which I would like to avoid, as I wish to link images to point elements via hyperlink text column and display it in the XFM property box that appears when the Analyze tool is used.

Any ideas?

Tx

SRG

 

  • I do not know of anything "out of the box". I suspect the closest property type would be a RichText item, but that would take some additional coding to be able to embed the hyperlink into the rich text item. Once that is done, then you will have to change the Analyze tool style sheet to be able to display the picture when selecting the feature instance.

     

    Someone else may have additional thoughts on this, but this is all I have right now.

    HTH 

    Jerry

     

  • Even though the data type is not supported (maybe it should). Properties could be 'hyperlinked' by modifying the XSLT that is used in the XFM analyze dialog. During the transformation, the necessary information could be added.

    Note that this will currently only work for information that is publicly available on the web, it does not work for files stored locally.

    Cheers,

     Gijsbert


    This is a test

  • Here is a sample of an xslt file for use with hyperlinks....

     If the value LINK is there, it reads the link value....for instance http://www.google.com/ and creates a link out of that property in the property viewer...

    The code below would have to fit into the file called default.xslt, which you can find in your Bentley Map installation Directory, under C:/Program Files/Bentley

     <!-- Template for elements with element children -->
    <xsl:template match="*">
        <xsl:param name="tag"/>
     
           <xsl:element name="tr">
           <xsl:attribute name="{$tag}">yes</xsl:attribute>
           <xsl:attribute name="class">r<xsl:value-of select="position() mod 2"/></xsl:attribute>
           <xsl:attribute name="style">display:block;</xsl:attribute>
             <xsl:choose>
              <xsl:when test="name()='LINK'">
               <td><xsl:value-of select="name()"/></td>
               <td><a target="_blank"><xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a></td>
              </xsl:when>
              <xsl:otherwise>
              <td><xsl:value-of select="name()"/></td>
              <td><xsl:value-of select="."/></td>
              </xsl:otherwise>
             </xsl:choose>
           </xsl:element>
    </xsl:template>