andreassperber

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • andreassperber
    Participant

    No Problem!
    I am very interested in this BUG, cause i canĀ“t use Map-View and iCAL-Export.
    When i update it manually, a user adds a new location and exports fail. Even for iCAL the Coordinates are not okay.

    BYE, hope to heare soon from, becaue my PRO-License ends in 15 Days

    andreassperber
    Participant

    Thanks Barry for your response,

    i am a PHP-Web-Developer by myself. So i think i know what is the Problem. With Javascript i never had this issue, but with PHP.

    With German-Settings, PHP uses the local Numeric-Format, even for float-variables.

    When the Geo-Coordinates are perfectly handled, as float-variables it would show like this:

    $floatVal = 2.3;
    var_dump(2.3); would show as 2,3
    And even, if you cast this floatValue into a string, it could happen, that the different decimal-seperator “,” is used, instead of the right one.

    So, i would suggest, to convert the FloatVariables of the GeoCoordinates into a String, before inserting into database, and replace (for sure) the comma with a dot.

    Example:
    $latitude = str_replace(‘,’,’.’,$latitude);

    I hope this helps to finde the problem. I am not very familiar with WordPress, so i had problems to find the code, where this happens.

    Thanks,
    Andreas

    andreassperber
    Participant

    I found the Problem:
    The GeoLocation-Values had the wrong Decimal-Seperators.
    In Germany we have , as Decimal-Separator. And somehow some of the GeoCoordinates where wrong.

    I have corrected it manually in Database with this Statement:

    UPDATE `wp_postmeta` SET meta_value = replace(meta_value,’,’,’.’)
    WHERE `meta_key` like ‘_VenueLng%’ and meta_value like ‘%,%’

    And everything works.
    ICAL-Export also was incorrect cause of that.

    Maybe you could check, that the numberformat is right, when the GeoCoordinates will be written.

Viewing 3 posts - 1 through 3 (of 3 total)