• Resolved mlplus

    (@mlplus)


    Hi!

    Got a strange problem. The location map shows fine in 99%, but in some locations it doesn’t. The Link is provided above. I use latst version of WordPress, but EME version 2.1.16. I tried to enable and disable option “Include JS in header” but without any differnce. I been using this plugin for many years and this problem have never been there before.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Franky

    (@liedekef)

    Check your location definition. If the coordinates are invalid, then the map won’t show it. In this case, it seems one of the coordinates is 37.0913600.005 (mark the two “.”), which is invalid. It is beyond me on how that gets in there (maybe imported?). Just change the address a bit and back until you get valid coordinates.

    Thread Starter mlplus

    (@mlplus)

    Hi Franky!

    If I inspect (with Chrome browser) I see this code and coordinates:
    <div id=”eme-location-map_1156407008_1556123378_441″ class=”eme-location-map” style=”width: 320px; height: 320px” data-lat=”37.091360″ data-lon=”-3.634546″ data-map_icon=”” data-map_text=”Plaza de la Constitución<br />” data-enable_zooming=”true” data-gestures=”false” data-default_map_icon=”” data-zoom_factor=”14″></div>

    Plugin Author Franky

    (@liedekef)

    Indeed, very weird …
    Apparently sometimes the location gets interpreted as text. See this in eme_location_map.js:

    var mapCenter= L.latLng(lat_id+0.005,lon_id-0.003);

    The console reports “Invalid LatLng object: (37.0913600.005, -3.637546)”, it seems the extra “0.005” comes from “37.091360” concatenated with “0.005”.
    Weird that this happens only sometimes …
    I think I’ll need to add some parseFloat-conversions to be sure it is a float.
    Check if this helps (make sure to clear your browser cache):
    https://plugins.trac.www.ads-software.com/changeset/2074162/

    Thread Starter mlplus

    (@mlplus)

    Hi Franky!

    It did help with the change. Thank you!

    I also tried to install your latest version but it complains that I need a newer version of PHP?

    Plugin Author Franky

    (@liedekef)

    That’s an easy one: https://www.php.net/supported-versions.php ??
    7.0 and lower are EOL, and 7.1 is in security-updates only. It is wise to update to a newer version (although the older ones will work for now).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Location map not showing for some locations’ is closed to new replies.