Fedajkin
26-07-2006, 08:46
Zainstalowałem wersje beta komponentu Google Maps i problem mam z templatem do mapy. Chodzi o to, że dodałem wyświetlanie opisu markera z mapy ale jeżeli opis jest za długi, chmurka z opisem markera rozszerza się dość mocno. Niby w stylach nadałem wartość max-width ale jest ona nie wykonywana... może coś źle wpisałem..
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<div class="infoWindow" style="min-width:200px;max-width:300px">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="info">
<!-- This is the info window for all the markers in the Joomla database -->
<p>
<b><xsl:value-of select="name"/></b>
<br /><xsl:value-of select="address"/>
<br /><xsl:value-of select="city"/><br />
<br /><xsl:value-of select="misc"/> <xsl:value-of select="state"/>
<br /><xsl:text> </xsl:text><xsl:value-of select="zipcode"/>
</p>
</xsl:template>
<xsl:template match="Result">
<!-- This is the info window for all the Yahoo Local Search component -->
<p>
<xsl:choose>
<xsl:when test="BusinessUrl">
<a>
<xsl:attribute name="href">
<xsl:value-of select="BusinessUrl"/>
</xsl:attribute>
<b><xsl:value-of select="Title"/></b>
</a>
</xsl:when>
<xsl:otherwise>
<b><xsl:value-of select="Title"/></b>
</xsl:otherwise>
</xsl:choose>
<br /><xsl:value-of select="Address"/>
<br /><xsl:value-of select="City"/>, <xsl:value-of select="State"/>
<br /><xsl:value-of select="Phone"/>
</p>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<div class="infoWindow" style="min-width:200px;max-width:300px">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="info">
<!-- This is the info window for all the markers in the Joomla database -->
<p>
<b><xsl:value-of select="name"/></b>
<br /><xsl:value-of select="address"/>
<br /><xsl:value-of select="city"/><br />
<br /><xsl:value-of select="misc"/> <xsl:value-of select="state"/>
<br /><xsl:text> </xsl:text><xsl:value-of select="zipcode"/>
</p>
</xsl:template>
<xsl:template match="Result">
<!-- This is the info window for all the Yahoo Local Search component -->
<p>
<xsl:choose>
<xsl:when test="BusinessUrl">
<a>
<xsl:attribute name="href">
<xsl:value-of select="BusinessUrl"/>
</xsl:attribute>
<b><xsl:value-of select="Title"/></b>
</a>
</xsl:when>
<xsl:otherwise>
<b><xsl:value-of select="Title"/></b>
</xsl:otherwise>
</xsl:choose>
<br /><xsl:value-of select="Address"/>
<br /><xsl:value-of select="City"/>, <xsl:value-of select="State"/>
<br /><xsl:value-of select="Phone"/>
</p>
</xsl:template>
</xsl:stylesheet>