Rework coordinates to avoid scientific formatting of small numbers. Fixes #1509
This commit is contained in:
parent
ab3df6fc56
commit
396f2e28dd
12 changed files with 76 additions and 37 deletions
|
@ -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"] = format("%.7f", lat)
|
||||
el["lon"] = format("%.7f", lon)
|
||||
el["lat"] = lat.to_s
|
||||
el["lon"] = lon.to_s
|
||||
end
|
||||
|
||||
add_tags_to_xml_node(el, node_tags)
|
||||
|
|
|
@ -2,7 +2,7 @@ json.type "Feature"
|
|||
|
||||
json.geometry do
|
||||
json.type "Point"
|
||||
json.coordinates [ note.lon, note.lat ]
|
||||
json.coordinates [ note.lon.to_f, note.lat.to_f ]
|
||||
end
|
||||
|
||||
json.properties do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue