app/views/event_venues/index.js.erb in radiant-event_map-extension-1.3.0 vs app/views/event_venues/index.js.erb in radiant-event_map-extension-1.3.1
- old
+ new
@@ -16,15 +16,20 @@
style: google.maps.MapTypeControlStyle.<%= (Radiant::Config['event_map.googlemap.controlstyle'] || 'DROPDOWN_MENU').upcase %>
}
});
var bounds = new google.maps.LatLngBounds();
<% venues.each do |venue| %>
+ var location = new google.maps.LatLng("<%= venue.lat %>","<%= venue.lng %>")
add_marker(map, {
title : "<%= escape_javascript(venue.title) %>",
- position : new google.maps.LatLng("<%= venue.lat %>","<%= venue.lng %>"),
+ position : location,
+ <% if Radiant::Config['event_map.use_calendar_icons?'] && slug = slug_for_venue(venue) %>
+ image : "/images/map_icons/<%= slug %>.png",
+ shadow : "/images/map_icons/<%= slug %>_shadow.png",
+ <% end %>
description : "<%= escape_javascript(render :partial => 'venue', :object => venue) %>"
});
- bounds.extend(new google.maps.LatLng("<%= venue.lat %>","<%= venue.lng %>"));
+ bounds.extend(location);
<% end %>
map.fitBounds(bounds);
}
}