WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. daniish
    Member
    Posted 2 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:
    <description><![CDATA[http://www.globexposure.net/?p=115]]></description>

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

    Many thanks

    http://wordpress.org/extend/plugins/wp-flexible-map/

  2. webaware
    Member
    Plugin Author

    Posted 2 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
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 years ago #

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

    The kml i am using can be seen here:
    http://www.globexposure.net/kml/110.kml

    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
    Member
    Plugin Author

    Posted 2 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

About this Topic