WordPress.org

Ready to get started?Download WordPress

Forums

WP Flexible Map
[resolved] Add url to marker popup (3 posts)

  1. colinsp
    Member
    Posted 1 year ago #

    I am playing around with this plugin and it is looking good so far. I have got a map on my site with the markers loaded from a kml file. How do I edit what appears in the pop-up when the marker is clicked? I would like my own image in there and also a link to the appropriate page on my site.

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

  2. webaware
    Member
    Plugin Author

    Posted 1 year ago #

    G'day colinsp,

    You can put HTML in the <description> element in your KML file, and it will be displayed in the info window. e.g.

    [flexiblemap src="http://snippets.webaware.com.au/maps/test.kml?v=4" width="100%" height="400px" zoom="14"]

    <?xml version="1.0" encoding="UTF-8"?>
    <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
    <Document>
        <Style id="markerStyle">
            <IconStyle>
                <Icon><href>http://maps.google.com/mapfiles/kml/pal4/icon57.png</href></Icon>
            </IconStyle>
        </Style>
        <Placemark>
            <name>Blackalls Park</name>
            <description>
                <![CDATA[
                <img style="float:right" src="http://www.webaware.com.au/wp-content/themes/webaware-responsive/images/webaware_logo.gif"/>
                <p>A lovely spot for watching the mullet jump</p>
                <p><a href="http://www.example.com/">click</a></p>
                ]]>
            </description>
            <styleUrl>#markerStyle</styleUrl>
            <Point>
                <coordinates>151.591233,-32.998793,0</coordinates>
            </Point>
        </Placemark>
    </Document>
    </kml>
  3. colinsp
    Member
    Posted 1 year ago #

    Thanks for the answer I will give it a go but it will be a bit tedious to do this for all the entries.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags