Support » Plugin: Flexible Map » HTML wasn't showing when using address parameter

  • Resolved John Sundberg


    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,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author webaware


    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"


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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTML wasn't showing when using address parameter’ is closed to new replies.