Commit be50abba51847fca6c3efb2ce30d1d0d6646c5bf
1 parent
1672fd6e
Exists in
master
and in
21 other branches
search: google-maps is loaded only once
Google Maps lib was being loaded on every submit. I moved the include to the search page, outside the search content.
Showing
4 changed files
with
6 additions
and
7 deletions
Show diff stats
app/views/search/_google_maps.html.erb
| ... | ... | @@ -3,12 +3,7 @@ |
| 3 | 3 | <div id="map"></div> |
| 4 | 4 | </div> |
| 5 | 5 | |
| 6 | -<%= content_tag('script', '', :src => "http://maps.google.com/maps/api/js?sensor=true", :type => 'text/javascript') %> | |
| 7 | -<%= javascript_include_tag('google_maps') %> | |
| 8 | - | |
| 9 | -<% | |
| 10 | - icon = default_or_themed_icon("/images/icons-map/enterprise.png") | |
| 11 | -%> | |
| 6 | +<% icon = default_or_themed_icon("/images/icons-map/enterprise.png") %> | |
| 12 | 7 | |
| 13 | 8 | <script type='text/javascript'> |
| 14 | 9 | mapLoad(<%= GoogleMaps.initial_zoom.to_json %>); | ... | ... |
app/views/search/search_page.html.erb
public/javascripts/search.js