Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brian

    (@brianmiyaji)

    @novac Thanks for spotting this. You’re right, the map links were not escaped properly. I’ve just fixed this here: https://github.com/ThemeBoy/SportsPress/commit/bdddfc54ced438719cd7e99c42644396fa4445dd

    The fix will be included in the next update.

    Take care about the degree symbol char. In my case, the original string was containing the ? char to correctly pass the degrees ° symbol.
    Original code:
    <a href="https://www.google.com/maps/place/<?php echo esc_url( urlencode("{$lat_deg}?°{$lat_min}'{$lat_sec}\"{$lat_dir}" ) ) . '+' . esc_url( urlencode( "{$lon_deg}?°{$lon_min}'{$lon_sec}\"{$lon_dir}" ) ); ?>/@<?php echo esc_url($latitude); ?>,<?php echo esc_url($longitude); ?>,<?php echo esc_url($zoom); ?>z" target="_blank"><div id="sp_openstreetmaps_container" style="width: 100%; height: 320px"></div></a>
    Replacing the string with the fix provided by github the result is a map without the degree char, so the longitude and latitude are just guessed by google maps and the correct address is not showed.
    Adding the ? char to the fix returns a correct map link that shows the address too.
    <a href="<?php echo esc_url( 'https://www.google.com/maps/place/' . urlencode( "{$lat_deg}?°{$lat_min}'{$lat_sec}\"{$lat_dir}" ) . '+' . urlencode( "{$lon_deg}?°{$lon_min}'{$lon_sec}\"{$lon_dir}" ) . '/@' . $latitude . ',' . $longitude . ',' . $zoom . 'z' ); ?>" target="_blank"><div id="sp_openstreetmaps_container" style="width: 100%; height: 320px"></div></a>

    • This reply was modified 2 years, 11 months ago by f3rr0. Reason: corrected the code section

    Hi f3rr0,

    Can you please create a new ticket, so we can tag our team in it?

    Usually new tickets are better, even if the issues are related, to make the topics clearer. It can get confusing quite fast when we try to fix multiple consequent issues in one thread.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Venue Map Links Broken’ is closed to new replies.