This commit is contained in:
Mayank Tankhiwale 2019-11-23 20:32:47 +05:30
commit 11cd1c9fc1
93 changed files with 1266 additions and 846 deletions

View file

@ -2,7 +2,7 @@ json.type "Feature"
json.geometry do
json.type "Point"
json.coordinates [ note.lon.to_f, note.lat.to_f ]
json.coordinates [note.lon.to_f, note.lat.to_f]
end
json.properties do
@ -16,12 +16,12 @@ json.properties do
json.close_url close_note_url(note, :format => params[:format])
end
json.date_created note.created_at
json.date_created note.created_at.to_s
json.status note.status
json.closed_at note.closed_at if note.closed?
json.closed_at note.closed_at.to_s if note.closed?
json.comments(note.comments) do |comment|
json.date comment.created_at
json.date comment.created_at.to_s
if comment.author
json.uid comment.author.id

View file

@ -1,5 +1,5 @@
json.type "FeatureCollection"
json.features(@notes) do |note|
json.ingest! render(note)
json.partial! note
end

View file

@ -0,0 +1 @@
json.partial! @note

View file

@ -1 +0,0 @@
json.ingest! render(@note)

View file

@ -0,0 +1,6 @@
attrs = {
"k" => user_preference.k,
"v" => user_preference.v
}
xml.preference(attrs)

View file

@ -0,0 +1,7 @@
xml.instruct!
xml.osm(OSM::API.new.xml_root_attributes) do |osm|
osm.preferences do |preferences|
preferences << (render(@user_preferences) || "")
end
end