Skip to content

Commit

Permalink
Use 6 decimal places on postcode HTML page.
Browse files Browse the repository at this point in the history
No idea why the latitude in the wmflabs link was being limited to
1 decimal place previously!
  • Loading branch information
dracos committed May 9, 2017
1 parent 2b47eae commit 130a8d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapit/templates/mapit/postcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>{{ postcode.postcode }}</h2>
E/N: {{ postcode.easting }}, {{ postcode.northing }}
{% endif %}
{% if postcode.wgs84_lat or postcode.wgs84_lon %}
<li>{% trans "WGS84 lat/lon" %}: <a href="https://tools.wmflabs.org/geohack/geohack.php?params={{ postcode.wgs84_lat|floatformat }};{{ postcode.wgs84_lon }}">{{ postcode.wgs84_lat }}, {{ postcode.wgs84_lon }}</a>
<li>{% trans "WGS84 lat/lon" %}: <a href="https://tools.wmflabs.org/geohack/geohack.php?params={{ postcode.wgs84_lat|floatformat:-6 }};{{ postcode.wgs84_lon|floatformat:-6 }}">{{ postcode.wgs84_lat|floatformat:-6 }}, {{ postcode.wgs84_lon|floatformat:-6 }}</a>
{% else %}
<li>{% blocktrans trimmed %}
No location information. Note this <em>is</em> a valid postcode (otherwise you would have got a 404), just one for which we don&rsquo;t know the location.
Expand All @@ -36,7 +36,7 @@ <h2>{{ postcode.postcode }}</h2>
maxZoom: 18
});

var point = new L.LatLng({{ postcode.wgs84_lat }}, {{ postcode.wgs84_lon }});
var point = new L.LatLng({{ postcode.wgs84_lat|floatformat:-6 }}, {{ postcode.wgs84_lon|floatformat:-6 }});
var marker = new L.Marker(point);
map.addLayer(marker);
map.setView(point, 14);
Expand Down

0 comments on commit 130a8d8

Please sign in to comment.