A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
agenda-libre-ruby/app/assets/javascripts/maps.js.coffee

21 lines
1.0 KiB

$(document).ready ->
if $('#map').size() > 0
map = L.map('map').setView [46.5, 4], 6
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',
#L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png',
#L.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',
#attribution: 'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> &mdash; 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>',
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
#subdomains: '1234'
).addTo map
$.getJSON '/maps.json', (json) ->
L.geoJson(json,
onEachFeature: (feature, layer) ->
# Does this feature have a property named popupContent?
if (feature.properties && feature.properties.popupContent)
layer.bindPopup(feature.properties.popupContent)
).addTo map