Skip to content

Instantly share code, notes, and snippets.

@cannapages
Last active December 16, 2015 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cannapages/5392466 to your computer and use it in GitHub Desktop.
Save cannapages/5392466 to your computer and use it in GitHub Desktop.
Leaflet
jQuery ->
if $("#map").size() > 0
map = L.map('map').setView([30, 0], 3)
map.fitBounds([[-90, -180],[90, 180]])
cloud_made =
api_key: 'thekey'
style_id: '92877'
tile_size: '256'
minZoom: 3
maxZoom: 4
noWrap: true
reuseTiles: true
L.tileLayer('http://{s}.tile.cloudmade.com/{api_key}/{style_id}/256/{z}/{x}/{y}.png', cloud_made).addTo(map)
open_weather =
minZoom: 3
maxZoom: 4
opacity: 0.5
noWrap: true
reuseTiles: true
L.tileLayer('http://{s}.tile.openweathermap.org/map/precipitation/{z}/{x}/{y}.png', open_weather).addTo(map)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment