--- a/iplookup/index.php +++ b/iplookup/index.php @@ -83,13 +83,19 @@ if (empty($CFG->googlemapkey3)) { $imgheight = 310; $dotwidth = 18; $dotheight = 30; + $lon_sign = 1; + $lon_margin = "left"; + if (right_to_left()){ + $lon_sign = -1; + $lon_margin = "right"; + } - $dx = round((($info['longitude'] + 180 ) * ($imgwidth / 360)) - $imgwidth - $dotwidth/2); + $dx = round((( $lon_sign * $info['longitude'] + 180 ) * ($imgwidth / 360)) - $imgwidth - $dotwidth/2); $dy = round((($info['latitude'] ) * ($imgheight / 90)) + $dotheight); echo '