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=
Hi Suzy
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[1]" /><xsl:variable name="lng" select="$cords/values/value[2]" />
I hope this example gives you some inspiration on how to fecth the coordinates by splitting the values.
/Jan
Thanks for such a quick response, meant I got this working before the holidays :D
To fetch the values it is $coords/value[1] and $coords/value[2] 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.
Happy holidays!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Linking to the google map
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=
Hi Suzy
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[1]" />
<xsl:variable name="lng" select="$cords/values/value[2]" />
I hope this example gives you some inspiration on how to fecth the coordinates by splitting the values.
/Jan
Thanks for such a quick response, meant I got this working before the holidays :D
To fetch the values it is $coords/value[1] and $coords/value[2] though.
Hi Suzy
I'm glad I could help - yes you're right, that's the part that always tricks me since <values> is the root element.
Happy holidays!
/Jan
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.