Format latitudes and longitudes as %7f in XML output

This matches the double formatting in XML from cgimap. Fixes #341.
This commit is contained in:
Andy Allan 2017-03-30 14:30:54 +01:00
parent 503610e603
commit 4fb775d6d5
2 changed files with 10 additions and 2 deletions

View file

@ -185,8 +185,8 @@ class Node < ActiveRecord::Base
add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache)
if visible?
el["lat"] = lat.to_s
el["lon"] = lon.to_s
el["lat"] = format("%.7f", lat)
el["lon"] = format("%.7f", lon)
end
add_tags_to_xml_node(el, node_tags)