Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kim Grandgagnage 63 posts 87 karma points
    Sep 16, 2011 @ 13:57
    Kim Grandgagnage
    0

    Google Maps v3: how to set zoom in script?

    Hi,

    How can I set the zoom for a google map v3?

    I use the following code in my xslt script:

    <script>
          $(function() {
          $(".map<xsl:value-of select="position()"/>").goMap({
            markers: [
          <xsl:variable name="shopname" select="./winkel_Naam"/>
          <xsl:variable name="shopstreet" select="./winkel_straat"/>
          <xsl:variable name="shoppostal" select="./winkel_postcode"/>
          <xsl:variable name="shopcity" select="./winkel_gemeente"/>
          <xsl:variable name="winkel_point" select="umbraco.library:Split(./winkel_point, ',')"/>
          <xsl:for-each select="$winkel_point/value">
            <xsl:if test="position() = 1">{ latitude: <xsl:value-of select="current()"/>,</xsl:if>
            <xsl:if test="position() = 2">longitude: <xsl:value-of select="current()"/>, title: '<xsl:value-of select="$shopname"/>', html: { content: '<font face="verdana" size="3"><xsl:value-of select="$shopname"/></font><br/><font face="verdana" size="1"><xsl:value-of select="$shopstreet"/><br/><xsl:value-of select="$shoppostal"/>&nbsp;<xsl:value-of select="$shopcity"/></font>', popup:false } }</xsl:if>
          </xsl:for-each>
          <xsl:if test="position() != last()">,</xsl:if>
        ], maptype: 'ROADMAP', zoom:16
          });
        
          $.goMap.fitBounds();
        });
    </script>

    The "zoom" doesn't do anything when I change the value of it. What am I doing wrong?

    grts,

    Kim


  • Kim Grandgagnage 63 posts 87 karma points
    Oct 14, 2011 @ 15:43
    Kim Grandgagnage
    0

    Anyone?

Please Sign in or register to post replies

Write your reply to:

Draft