Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed whitespace, added descriptions
- Loading branch information
Shawn Allen
committed
Jan 5, 2012
1 parent
cb1a32d
commit 21d1741
Showing
2 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>ModestMaps: Spotlight Effect with HTML Canvas</title> | ||
<script type="text/javascript" src="../../modestmaps.js"></script> | ||
<script type="text/javascript" src="spotlight.js"></script> | ||
<script type="text/javascript"> | ||
var map, layer; | ||
function initMap() { | ||
var tiles = new MM.TemplatedMapProvider("http://spaceclaw.stamen.com/toner/{Z}/{X}/{Y}.png"); | ||
map = new MM.Map("map", tiles); | ||
<head> | ||
<title>ModestMaps: Spotlight Effect with HTML Canvas</title> | ||
<script type="text/javascript" src="../../modestmaps.js"></script> | ||
<script type="text/javascript" src="spotlight.js"></script> | ||
<script type="text/javascript"> | ||
var map, layer; | ||
function initMap() { | ||
var tiles = new MM.TemplatedMapProvider("http://spaceclaw.stamen.com/toner/{Z}/{X}/{Y}.png"); | ||
map = new MM.Map("map", tiles); | ||
|
||
layer = new SpotlightLayer(); | ||
layer.spotlight.radius = 40; | ||
map.addLayer(layer); | ||
layer = new SpotlightLayer(); | ||
layer.spotlight.radius = 40; | ||
map.addLayer(layer); | ||
|
||
map.setCenterZoom(new MM.Location(37.7819, -122.3365), 12); | ||
map.setCenterZoom(new MM.Location(37.7819, -122.3365), 12); | ||
|
||
var locations = [ | ||
new MM.Location(37.804, -122.252), | ||
new MM.Location(37.764, -122.419) | ||
]; | ||
locations.forEach(function(loc) { | ||
layer.addLocation(loc); | ||
}); | ||
} | ||
</script> | ||
<style type="text/css"> | ||
#map { | ||
width: auto; | ||
height: 600px; | ||
} | ||
</style> | ||
</head> | ||
<body onload="initMap()"> | ||
<h1>Spotlight effect</h1> | ||
var locations = [ | ||
new MM.Location(37.804, -122.252), | ||
new MM.Location(37.764, -122.419) | ||
]; | ||
locations.forEach(function(loc) { | ||
layer.addLocation(loc); | ||
}); | ||
} | ||
</script> | ||
<style type="text/css"> | ||
#map { | ||
width: auto; | ||
height: 600px; | ||
} | ||
</style> | ||
</head> | ||
<body onload="initMap()"> | ||
<h1>Spotlight effect</h1> | ||
|
||
<div id="map"> | ||
</div> | ||
</body> | ||
<p>The spotlights on this map are pinned to two geographic locations. Check | ||
out the <a href="markers.html">Crimespotting-inspired example</a>.</p> | ||
|
||
<div id="map"> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters