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
I want to add a link to google maps itself using the coordinates selected but the value saved by the datatype includes the zoom value.
How do I remove the zoom so it's just long,lat so I can append it to the URL http://maps.google.co.uk/maps?q=
In XSLT you would need to use the umbraco.library:Split extension where you split the value by each comma. For instance like this
<xsl:variable name="cords" select="umbraco.library:Split(yourproperty,',')" />
This creates a piece of XML that looks like this:
<values><value>51.0020</value><value>9.1029</value><value>13</value></values>Now you can fecth the two values by doing something like this...
<xsl:variable name="lat" select="$cords/values/value" /><xsl:variable name="lng" select="$cords/values/value" />
I hope this example gives you some inspiration on how to fecth the coordinates by splitting the values.
Thanks for such a quick response, meant I got this working before the holidays :D
To fetch the values it is $coords/value and $coords/value though.
I'm glad I could help - yes you're right, that's the part that always tricks me since <values> is the root element.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted