Support » Plugin: Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps) » [Plugin: Leaflet Maps Marker] Map isnt showing

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author RobertHarm


    try disabling all other plugins – if it still doesnt work, it is a conflict with your template…

    Plugin Author RobertHarm


    I very much think it is because of the chaning background of your current template which might be conflicting the javascript of my plugin…



    Yee I have this problem too

    Plugin Author RobertHarm


    please follow the instructions from



    I have the same problem. I can see the first bar where appear the name of the map, but not the rest.

    I have make a little editing on the code.

    The file subject is: leaflet-maps-maker.php.
    the problem is on the call to function marker.bindPopup, because the HTML code injection have a carriage return that interrupt the Javascript code, returning an error: “Unterminated string literal”.

    My Solution is:

    if (!empty($mpopuptext)) $lmm_out .= 'marker.bindPopup(unescape("' . rawurlencode(preg_replace('/(1512)|(15)|(12)/','<br/>',$mpopuptext)) . '"), [...]

    Explain: it’s necessary to make the code unterminated convert the string $mpopuptext in an URL encoding (in raw mode) on the server side, and then make an unescape in Javascript (so, client side).

    I wish this can help someone.

    Plugin Author RobertHarm


    thanks for poiting this out! I will check if there are any sideffects and if not include this fix in the next release…

    Plugin Author RobertHarm


    Hi klode,
    I tried your code but it didnt work for me – special characters were not shown anymore and line breaks were removed. If you have time, please create a new marker at your blog with the adapted code and copy the popup text from into the popup of your marker. As you will see, the solution is does not work there. Any help why is very appreciated.
    Ad carriage return: this was actually the reason why I added preg_replace(…) to replace returns and carriage returns with
    in order not to break the javascript. A reason I could think of is that there are other codes for line breaks or carriage returns like 15 or 12 (unicode format). will take a further look at it…

    I have the same problem. I disabled all the plugins. None of the plugins is causing the problem. I tried twenty eleven theme and the plugin works fine. I don’t know why but switching back to simple n bright theme is causing this error:

    SyntaxError: unterminated string literal
    [Break On This Error]
    marker.bindPopup(“text pe-aici Sediu Tg BUjor
    scripts.js (line 26, col 17)

    Here is a test page

    Plugin Author RobertHarm


    @andreiim: I think the problem is caused by the script button.js from your template which is overwriting \’ with ” – this is causing maps to break. Try adding a map with no title and popuptext and see if it works. If yes, try adding ‘ or ” to popuptext to see if this breaks the map.

    If button.js is the cause for the error (try disabling this script to confirm this), the issue would have to be solved in your template…

    It wasn’t the button.js causing the problem, but the shortcodes.php file and the way the wordpress autoformat filters were enabled/disabled by the theme.
    I didn’t find the solution by myself, but the guy who made the theme I’m using helped me through his forum

    Anyway, if anyone else has this problem it should look into how wpautop and wptexturize filters are used.

    I suppose that these filters can also be disabled by the plugin. Maybe when you’ll have the time, and if you find this worthy you’ll look into it.

    Thank you for your support and for this great plugin!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Leaflet Maps Marker] Map isnt showing’ is closed to new replies.