WordPress.org

Forums

Flexible Map
[resolved] HTML wasn't showing when using address parameter (3 posts)

  1. John Sundberg
    Member
    Posted 3 years ago #

    Thanks for this plugin, first of all. I've been looking for a clean and efficient Google Maps plugin for a while now, and I'm not sure how I missed this one before.

    Anyhow, I've been testing it on a demo site and I was trying to get the street address to show in the info window while using the address parameter and not the center (coordinates) parameter.

    I tried the description parameter with something like this:

    222 Elm Street<br />Anywhere, US 55555

    but it would print the break tag on the screen.

    Next I tried the html parameter but nothing would show, which I thought was odd.

    I then took a look in the class.FlxMapPlugin.php file and noticed that there was not an If conditional for the html parameter in the code sequence for the address parameter. I copied the html parameter from the center parameter above and pasted it in at line 311, and the html printed to the screen just the way it should.

    The code I added to line 311 is this:

    if (!empty($attrs['html']))
    $script .= " f.markerHTML = \"{$this->str2js($attrs['html'])}\";\n";

    I'd be curious to know if that was left out intentionally and/or if there is another way to achieve what I was trying to do.

    Thanks again for your work on this,
    John

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

  2. webaware
    Member
    Plugin Author

    Posted 3 years ago #

    G'day John, that was just an oversight; thanks for the bugfix :)

    BTW, you can achieve what you want with the plain-text description, just by adding in a newline:

    description="222 Elm Street\nAnywhere, US 55555"

    cheers,
    Ross

  3. John Sundberg
    Member
    Posted 3 years ago #

    Ahh, thanks for that tip about the newline. And thanks for the mention on the changelog!

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic

Tags

No tags yet.