WordPress.org

Ready to get started?Download WordPress

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
[resolved] [Plugin: Leaflet Maps Marker] Map isnt showing (11 posts)

  1. upmonga
    Member
    Posted 2 years ago #

    I'm not sure what's going on, but I spent hours reading different discussion questions and I throughly made setting changes.

    http://www.congologie.com/#/drc-hubs

    Please help.

    http://wordpress.org/extend/plugins/leaflet-maps-marker/

  2. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

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

  3. RobertHarm
    Member
    Plugin Author

    Posted 2 years ago #

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

  4. Donatass
    Member
    Posted 1 year ago #

    Yee I have this problem too

  5. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

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

  6. klode
    Member
    Posted 1 year ago #

    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.

  7. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

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

  8. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    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

  9. andreiim
    Member
    Posted 1 year ago #

    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/

  10. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    @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...

  11. andreiim
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic