Skip to content

Instantly share code, notes, and snippets.

@slayton
Created September 5, 2012 17:33
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 slayton/3640741 to your computer and use it in GitHub Desktop.
Save slayton/3640741 to your computer and use it in GitHub Desktop.
Simple HTML file that demonstrates Leaflet rendering errors
<html>
<style media="screen" type="text/css"> #map { height: 480px; width:680px; }</style>
<div id="map"></div>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script>
<script>
var map = L.map('map');
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/{key}/997/256/{z}/{x}/{y}.png';
var myLeafletKey ='....';
L.tileLayer(cloudmadeUrl, {
key: myLeafletKey,
}).addTo(map);
map.setView([42.3904, -71.0986], 13);
var polyBounds = [[ 42.41, -71.13 ], [ 42.42, -71.13 ],[ 42.41, -71.14 ]];
var badLocation = [5792.392296, -71.089496];
L.polygon(polyBounds).addTo(map);
L.circle(badLocation,1).addTo(map);
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment