WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: wp-flexible-map] targetfix parameter doesn't work on KML (3 posts)

  1. maxwelton
    Member
    Posted 1 year ago #

    Hi, your plugin works well except the most important bit for me: I was very excited to find a KML plugin that fixes google's idiotic "target=_blank" crud in links within pop-ups, but setting the parameter in your shortcode to either true or false does nothing...though perhaps I don't understand what it's supposed to do. Thanks for any assistance.

  2. maxwelton
    Member
    Posted 1 year ago #

    Just some further info: If I pop an alert here (in the flexible-maps.js file, I changed the php file to look to this instead of the minimized version for debugging reasons):

    google.maps.event.addListener(kmlLayer, 'click', function(kmlEvent) {
       alert(kmlEvent.featureData.description);

    I do get the contents of the pop-up. If I do something like this:

    kmlEvent.featureData.description = 'hi';
    alert(kmlEvent.featureData.description);

    I get 'hi' as an alert, but the contents of the popup are not changed at all. I get the alert before the pop-up shows up on the map, but, like I say, the content of the pop-up is unchanged.

  3. webaware
    Member
    Posted 1 year ago #

    G'day,

    Thanks for the bug report. What's happened is that since Google Maps API version 3.9, the HTML for the info window for each marker is composed just after the map is loaded, so changing the description no longer works. (I guess the description is still there in case you want to use it in the event handler, e.g. to build your own HTML for the info window) FYI: the info window HTML is in an property called infoWindowHtml.

    I've make a fix, and will put a new release up in a few minutes. Thanks for letting me know!

    BTW: can you tell me please, how did you raise this support thread? It isn't linked from the Support tab on the plugin page, so I'm guessing you went via a different route. I didn't know that there was a new support thread until someone contacted me via my website to ask about it.

Topic Closed

This topic has been closed to new replies.

About this Topic