Copied to clipboard

Flag this post as spam?

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


  • Carlos 338 posts 472 karma points
    Mar 08, 2011 @ 17:55
    Carlos
    0

    Google maps location URL in XSLT

    I tried to add the URL for our location into an XSLT document and the URL threw me an error in the XSLT due to an "=" in the URL of our location.  It seems to be conflicting with XSLT.

    Just and FYI.

    I am trying to make a footer that when the address is clicked on the Google maps comes up.  I am going to use the macro for 2 different templates not within the same tree. But they will use the same macro. Using the "Develop once deploy once" method. 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 08, 2011 @ 21:35
    Jan Skovgaard
    0

    Hi Carlos

    Could you perhaps post the code that you're having trouble with?

    /Jan

  • Carlos 338 posts 472 karma points
    Mar 08, 2011 @ 21:41
    Carlos
    0

    Jan,

    I actually ended up using the Google's Short URL but just FYI this is what I was trying to do. Simple but was fighting with the XSLT validation.
    It is the URL that Google generates when you choose the link code for your address.
    I figured it was the "=" signs because that is what was showing up in my XSLT error when I tried to save the XSLT.

    This is the XSLT:

    <div id="mobileHoursLocation">
        <span>
          <a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Denver+Museum+Of+Nature+%26+Science:+Museum+Shop,+2001+Colorado+Boulevard,+Denver,+CO+80205&aq=0&sll=37.0625,-95.677068&sspn=45.957536,79.013672&ie=UTF8&hq=Denver+Museum+Of+Nature+%26+Science:+Museum+Shop,&hnear=2001+Colorado+Blvd,+Denver,+Colorado+80205&ll=39.749351,-104.94426&spn=0.010542,0.01929&t=h&z=16">2001 Colorado Blvd <br />
            Denver, CO 80205a><br />
          <a href="tel:1-303-370-6000">303.370.6000a>
        span>
        <span class="mobileHours">
          Open daily<br />
          9am - 5pm<br />
          Closed Christmas
        span>

      div>


    This is what I ended up doing instead with the Google's short URL generator in the Google Maps Labs.

    <div id="mobileHoursLocation">
        <span>
          <a href="http://goo.gl/maps/JvnM">2001 Colorado Blvd <br />
            Denver, CO 80205a><br />
          <a href="tel:1-303-370-6000">303.370.6000a>
        span>
        <span class="mobileHours">
          Open daily<br />
          9am - 5pm<br />
          Closed Christmas
        span>
      div>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 08, 2011 @ 22:32
    Jan Skovgaard
    0

    Hi Carlos

    Glad you got it solved.

    However I think the reason why the error occurs in the first example is because there is an unescaped & sign in it, which of course should be &amp; Not sure about the % sign...could maybe also cause trouble...

    Anyhow you found a good solution - You should however probably correct this line?       <a href="tel:1-303-370-6000">303.370.6000a> to       <a href="tel:1-303-370-6000">303.370.6000</a> - Guess it's a typo :-)

    /Jan

  • Carlos 338 posts 472 karma points
    Mar 08, 2011 @ 22:34
    Carlos
    0

    Ah yes the unescaped characters. I completely forgot or spaced that.

    Ah well. Nice catch too on the phone number.

    Thanks.

  • 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

Please Sign in or register to post replies