WP Flexible Map
[resolved] How-to add a URL in KML to display when a marker is clicked? (5 posts)

  1. daniish
    Posted 3 years ago #

    I would like to add a hyperlink to the marker so that when it is clicked (i do not want an infowindow to display) the user is sent to the relevant link (in this case a WP post).

    According to the KML reference, this can be achieved by adding a url to the <description> tag, like this:

    I can't get this working. Am i using the correct KML structure, or can you make a suggestion?

    Many thanks


  2. webaware
    Plugin Author

    Posted 3 years ago #

    You need to use actual HTML within your description, i.e.

    <description><![CDATA[<a href="http://www.globexposure.net/?p=115">my link</a>]]></description>

  3. webaware
    Plugin Author

    Posted 3 years ago #

    Actually, I just looked at this and just putting the URL into the description field works.

    See for example: http://snippets.webaware.com.au/maps/example-toronto.kml

  4. daniish
    Posted 3 years ago #

    I have tried implementing the code you suggest on this post.

    The kml i am using can be seen here:

    I suspect that perhaps the changes i make to the KML are not always being updated because it is cached by Google servers as explained here.

    What do you think?

  5. webaware
    Plugin Author

    Posted 3 years ago #

    Yes, you need to add a parameter to the url to fool Google not to cache it... E.g. add ?v=1 and change the number each time you edit the kml file. I'll add that as a FAQ next time I release a new revision :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Flexible Map
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic