Offset venue map to center up marker

This commit is contained in:
James Mason 2017-11-26 20:53:03 -08:00
parent 20e2b4b76b
commit 494a1b32a4

View file

@ -2,7 +2,7 @@
- content_for(:script_body) do
:javascript
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map', { scrollWheelZoom: false }).setView([#{h(@conference.venue.latitude)}, #{h(@conference.venue.longitude)}], 11);
var map = L.map('map', { scrollWheelZoom: false }).setView([#{@conference.venue.latitude.to_f + 0.05}, #{h(@conference.venue.longitude)}], 11);
// add an OpenStreetMap tile layer
L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',