Compact map_marker.js and use Utils.jsonify.

This commit is contained in:
Akinori MUSHA 2014-09-19 11:00:36 +09:00
parent 951648c94e
commit 223f3a61e9

View file

@ -1,13 +1,7 @@
<%- unless @map_marker_included_p -%> <%- unless @map_marker_included_p -%>
<%- content_for :head do -%> <%- content_for :head do -%>
<%= javascript_include_tag "map_marker" %> <%= javascript_include_tag "map_marker" %>
<%- end -%>
<%- @map_marker_included_p = true -%>
<%- end -%> <%- end -%>
map_marker(<%= map %>, { <%- @map_marker_included_p = true -%>
lat: <%= location[:lat].to_json %>, <%- end -%>
lng: <%= location[:lng].to_json %>, map_marker(<%= map %>, <%= Utils.jsonify(location) %>)
radius: <%= location[:radius].to_json %>,
course: <%= location[:course].to_json %>,
speed: <%= location[:speed].to_json %>
});