WordPress.org

Support

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

[Resolved] [Plugin: Leaflet Maps Marker] Map isnt showing

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

    @harmr

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

    Plugin Author RobertHarm

    @harmr

    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

    @harmr

    please follow the instructions from http://mapsmarker.com/readme-first

    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

    @harmr

    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

    @harmr

    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 http://current.mapsmarker.com/2012/09/02/test-bindpopup-neu/ 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…
    regards,
    Robert

    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 http://www.alfaim.ro/maps-leaflet-test/

    Plugin Author RobertHarm

    @harmr

    @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 http://www.s5themes.com/forums/topic/leaflet-maps-plugin-compatibility/

    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 ‘[Resolved] [Plugin: Leaflet Maps Marker] Map isnt showing’ is closed to new replies.
Skip to toolbar