aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-05 22:51:20 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-05 22:51:20 +0000
commitbd4e19804eb84b0a4aad3a573614e1ce1cc06564 (patch)
treebca0e5a2e04c1bee36873f688e7ebc3c25d1c114 /web
parent6ab524ffd5b698a4f2ba60427d8b340f73427ba5 (diff)
Don't check coordsyst as not set for Norway; always string truncate lat/lon.
Diffstat (limited to 'web')
-rwxr-xr-xweb/index.cgi9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/index.cgi b/web/index.cgi
index f8f119f54..e40987ec1 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -503,8 +503,6 @@ sub display_form {
# Map was clicked on (tilma, or non-JS OpenLayers, for example)
($latitude, $longitude) = FixMyStreet::Map::click_to_wgs84($q, $pin_tile_x, $pin_x, $pin_tile_y, $pin_y);
- # Shrink, as don't need accuracy plus we want them as English strings
- ($latitude, $longitude) = map { Utils::truncate_coordinate($_) } ( $latitude, $longitude );
} elsif ( $input{partial} && $input{pc} && !length $input{latitude} && !length $input{longitude} ) {
my $error;
@@ -521,6 +519,9 @@ sub display_form {
$longitude = $input_h{longitude};
}
+ # Shrink, as don't need accuracy plus we want them as English strings
+ ($latitude, $longitude) = map { Utils::truncate_coordinate($_) } ( $latitude, $longitude );
+
# Look up councils and do checks for the point we've got
my @area_types = Cobrand::area_types($cobrand);
# XXX: I think we want in_gb_locale around the next line, needs testing
@@ -938,7 +939,7 @@ sub display_location {
$map_links .= "</p>";
}
- # truncate the lat,lon for nicer rss urls
+ # truncate the lat,lon for nicer rss urls, and strings for outputting
my ( $short_lat, $short_lon ) =
map { Utils::truncate_coordinate($_) } #
( $latitude, $longitude );
@@ -963,7 +964,7 @@ sub display_location {
my %vars = (
'map' => FixMyStreet::Map::display_map($q,
- latitude => $latitude, longitude => $longitude,
+ latitude => $short_lat, longitude => $short_lon,
type => 1,
pins => \@pins,
post => $map_links