Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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"/> <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
Anyone?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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"/> <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
Anyone?
is working on a reply...