Permalink
Browse files

add site files

  • Loading branch information...
1 parent de48108 commit 75a6c4807b434bea6b175918fd8117aa3ec397ff mattg committed Apr 4, 2012
Showing with 160 additions and 0 deletions.
  1. +55 −0 css/style.css
  2. +19 −0 index.html
  3. +4 −0 js/libs/jquery-1.7.1.min.js
  4. +14 −0 js/libs/modestmaps.min.js
  5. +2 −0 js/libs/wax.mm.min.js
  6. +66 −0 js/site.js
View
@@ -0,0 +1,55 @@
+body {
+ background: #000;
+ }
+
+
+#map1, #map2, #map3, #mapmask {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 100%;
+ -moz-transition: opacity 5.0s linear;
+ -o-transition: opacity 5.0s linear;
+ -webkit-transition: opacity 5.0s linear;
+ transition: opacity 5.0s linear;
+ }
+
+#mapmask {
+opacity: 0;
+z-index: 1;
+}
+#map1 {
+z-index: 0;
+}
+#map2 {
+z-index: -1;
+}
+#map3 {
+z-index: -2;
+}
+
+ a.zoomer {
+ text-decoration:none;
+ position:absolute;
+ background-color:#444;
+ color:#fff;
+ line-height:25px;
+ font-size:20px;
+ z-index:99999;
+ text-align:center;
+ width:25px;
+ height:25px;
+ }
+
+ a.zoomin {
+ right:5px;
+ }
+
+ a.zoomout {
+ right:35px;
+ }
+
+ a.zoomdisabled {
+ background-color:#333;
+ }
View
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset=utf-8 />
+ <title>Rainbow Map</title>
+ <link rel='stylesheet' href='css/style.css' type='text/css' media='screen' />
+ <script src='js/libs/jquery-1.7.1.min.js' type='text/javascript'></script>
+ <script src='js/libs/modestmaps.min.js' type='text/javascript'></script>
+ <script src='js/libs/wax.mm.min.js' type='text/javascript'></script>
+ <script src='js/site.js' type='text/javascript'></script>
+</head>
+
+<body>
+ <div id='mapmask'></div>
+ <div id='map1'></div>
+ <div id='map2'></div>
+ <div id='map3'></div>
+</body>
+</html>

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,66 @@
+$(function() {
+
+ var m, a, b, c,
+ mm = com.modestmaps,
+ x = 1,
+ y = 3,
+ z = -3;
+
+ // Build maps
+ wax.tilejson('http://api.tiles.mapbox.com/v3/matt.tornadoes-2010.jsonp', function(tilejson) {
+
+ tilejson.minzoom = 4;
+ tilejson.maxzoom = 8;
+
+ m = new mm.Map('mapmask',
+ new wax.mm.connector(tilejson));
+
+ wax.mm.zoomer(m, tilejson).appendTo(m.parent);
+ wax.mm.attribution(m, tilejson).appendTo(m.parent);
+ m.setCenterZoom(new mm.Location(48.8558, 2.3524), 13);
+
+ m.addCallback("drawn", function (m) {
+ a.setCenterZoom(m.getCenter(), m.getZoom());
+ b.setCenterZoom(m.getCenter(), m.getZoom());
+ c.setCenterZoom(m.getCenter(), m.getZoom());
+ });
+ });
+ wax.tilejson('http://api.tiles.mapbox.com/v3/matt.map-1u1lncwl.jsonp', function(tilejson) {
+ a = new mm.Map('map1',
+ new wax.mm.connector(tilejson));
+ a.setCenterZoom(new mm.Location(48.8558, 2.3524), 13);
+ });
+ wax.tilejson('http://api.tiles.mapbox.com/v3/matt.map-939er64v.jsonp', function(tilejson) {
+ b = new mm.Map('map2',
+ new wax.mm.connector(tilejson));
+ b.setCenterZoom(new mm.Location(48.8558, 2.3524), 13);
+ });
+ wax.tilejson('http://api.tiles.mapbox.com/v3/matt.map-a0vfv6kt.jsonp', function(tilejson) {
+ c = new mm.Map('map3',
+ new wax.mm.connector(tilejson));
+ c.setCenterZoom(new mm.Location(48.8558, 2.3524), 13);
+ });
+
+ // Cycle opacity
+ function opacityChange() {
+ if (y == 4) {
+ y = 1;
+ }
+ if (x == 4) {
+ x = 1;
+ }
+ $('#map' + x).css('opacity','0');
+ $('#map' + y).css('z-index', z);
+ $('#map' + y).css('opacity','1');
+
+ x += 1;
+ y += 1;
+ z -= 1;
+ setTimeout(opacityChange, 5000);
+ }
+
+ $(document).ready(function() {
+ setTimeout(opacityChange, 2000);
+ });
+
+});

0 comments on commit 75a6c48

Please sign in to comment.