La carte prend maintenant en compte les éventuels paramètres comme tag ou region
This commit is contained in:
parent
aeefcd4048
commit
e078cfefec
@ -6,7 +6,7 @@ $(document).ready ->
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
||||
).addTo map
|
||||
|
||||
$.getJSON '/maps.json', (json) ->
|
||||
$.getJSON $(this).data('url') + location.search, (json) ->
|
||||
layer = L.geoJson(json,
|
||||
onEachFeature: (feature, layer) ->
|
||||
# Does this feature have a property named popupContent?
|
||||
@ -28,7 +28,7 @@ $(document).ready ->
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>'
|
||||
).addTo map
|
||||
|
||||
$.getJSON '/maps.json', (json) ->
|
||||
$.getJSON $(this).data('url') + location.search, (json) ->
|
||||
layer = L.geoJson(json,
|
||||
onEachFeature: (feature, layer) ->
|
||||
# Does this feature have a property named popupContent?
|
||||
|
@ -50,7 +50,7 @@
|
||||
"http://fr.wikipedia.org/wiki/#{url_encode @event.related_region.try(:name)}"
|
||||
|
||||
- if @event.latitude && @event.longitude
|
||||
#map(latitude="#{@event.latitude}" longitude="#{@event.longitude}")
|
||||
#map(data-url="#{maps_path format: :json}" latitude="#{@event.latitude}" longitude="#{@event.longitude}")
|
||||
|
||||
- elsif controller.action_name != 'show'
|
||||
%em.fa.fa-compress
|
||||
|
@ -2,4 +2,4 @@
|
||||
%em.fa.fa-map-marker
|
||||
=title t '.title'
|
||||
|
||||
#map
|
||||
#map(data-url="#{maps_path format: :json}")
|
||||
|
Loading…
Reference in New Issue
Block a user