Remove the map_marker partial, which is no longer useful.

This commit is contained in:
Akinori MUSHA 2014-09-19 15:20:24 +09:00
parent 223f3a61e9
commit d22cad0327
3 changed files with 10 additions and 11 deletions

View file

@ -1,4 +1,7 @@
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<% content_for :head do -%>
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?sensor=false" %>
<%= javascript_include_tag "map_marker" %>
<% end -%>
<h3>Recent Event Map</h3>
@ -15,7 +18,7 @@
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
<% events.each do |event| %>
<%= render "shared/map_marker", map: 'map', location: event.location %>
map_marker(map, <%= Utils.jsonify(event.location) %>);
<% end %>
</script>
<% else %>

View file

@ -16,7 +16,10 @@
</p>
<% if @event.lat && @event.lng %>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<% content_for :head do -%>
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?sensor=false" %>
<%= javascript_include_tag "map_marker" %>
<% end -%>
<p>
<b>Lat:</b>
@ -37,7 +40,7 @@
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
<%= render "shared/map_marker", map: 'map', location: @event.location %>
map_marker(map, <%= Utils.jsonify(@event.location) %>);
</script>
<% end %>

View file

@ -1,7 +0,0 @@
<%- unless @map_marker_included_p -%>
<%- content_for :head do -%>
<%= javascript_include_tag "map_marker" %>
<%- end -%>
<%- @map_marker_included_p = true -%>
<%- end -%>
map_marker(<%= map %>, <%= Utils.jsonify(location) %>)