Fix longitude latitude order

This commit is contained in:
Stella Rouzi 2015-06-15 12:19:13 +03:00
parent 491df2c5c6
commit ebadb84f2f
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
= f.inputs :street, :postalcode, :city, :country, :longitude, :latitude
= f.inputs :street, :postalcode, :city, :country, :latitude, :longitude
- unless @venue.photo.blank?
= image_tag @venue.photo(:thumb)
= f.input :photo

View file

@ -7,14 +7,14 @@
- 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([#{@conference.venue.longitude}, #{@conference.venue.latitude}], 11);
var map = L.map('map', {scrollWheelZoom: false}).setView([#{@conference.venue.latitude}, #{@conference.venue.longitude}], 11);
// add an OpenStreetMap tile layer
L.tileLayer('http://{s}.tile.osm.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>',
maxZoom: 18
}).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([#{@conference.venue.longitude}, #{@conference.venue.latitude}]).addTo(map)
L.marker([#{@conference.venue.latitude}, #{@conference.venue.longitude}]).addTo(map)
.bindPopup("#{popup}")
.openPopup();
// Turn scrollwheel on when user clicks