Unify lat/lon formatting for json output
This commit is contained in:
parent
45a1d298a9
commit
b54333fa6d
5 changed files with 18 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
json.bounds do
|
||||
json.minlat format("%.7f", @bounds.min_lat)
|
||||
json.minlon format("%.7f", @bounds.min_lon)
|
||||
json.maxlat format("%.7f", @bounds.max_lat)
|
||||
json.maxlon format("%.7f", @bounds.max_lon)
|
||||
json.minlat GeoRecord::Coord.new(@bounds.min_lat)
|
||||
json.minlon GeoRecord::Coord.new(@bounds.min_lon)
|
||||
json.maxlat GeoRecord::Coord.new(@bounds.max_lat)
|
||||
json.maxlon GeoRecord::Coord.new(@bounds.max_lon)
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
json.type "node"
|
||||
json.id node.id
|
||||
if node.visible
|
||||
json.lat format("%.7f", node.lat.to_f)
|
||||
json.lon format("%.7f", node.lon.to_f)
|
||||
json.lat GeoRecord::Coord.new(node.lat)
|
||||
json.lon GeoRecord::Coord.new(node.lon)
|
||||
end
|
||||
json.timestamp node.timestamp.xmlschema
|
||||
json.version node.version
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
json.type "node"
|
||||
json.id old_node.node_id
|
||||
if old_node.visible
|
||||
json.lat format("%.7f", old_node.lat.to_f)
|
||||
json.lon format("%.7f", old_node.lon.to_f)
|
||||
json.lat GeoRecord::Coord.new(old_node.lat)
|
||||
json.lon GeoRecord::Coord.new(old_node.lon)
|
||||
end
|
||||
json.timestamp old_node.timestamp.xmlschema
|
||||
json.version old_node.version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue