Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %script{:src => "//maps.google.com/maps/api/js?v=3.13&sensor=false&libraries=geometry", :type => "text/javascript"}
- %script{:src => "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js", :type => "text/javascript"}
- ........
- .col-lg-8.col-sm-8.col-md-8.col-xs-12
- #map
- %br/
- ......
- :javascript
- handler = Gmaps.build('Google');
- handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
- markers = handler.addMarkers(#{raw @hash.to_json});
- handler.bounds.extendWith(markers);
- handler.fitMapToBounds();
- handler.getMap().setZoom(16);
- });
- def show
- set_park
- @hash = Gmaps4rails.build_markers(@park) do |park, marker|
- marker.lat park.latitude
- marker.lng park.longitude
- marker.infowindow park.address
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement