Permalink
Browse files

examples fixed

  • Loading branch information...
1 parent 3162410 commit 51c51364f66c0ccad98eede2d31c86e06b57a8e8 @xavijam xavijam committed Aug 29, 2012
View
@@ -1,8 +1,9 @@
[v 0.53]
-- New examples page.
-- Attribution paramater added + function to set it as well.
+- Examples index page back.
+- Attribution paramater + function added.
- Wax (v7.0.0dev9) library updated.
- Leaflet (v0.4.4) library updated.
+- Removed noscript redirects.
[v 0.52]
- Bug related to removing wax interacion fixex.
@@ -142,11 +142,11 @@
height: 27px;
}
.leaflet-control-zoom-in {
- background-image: url(images/zoom-in.png);
+ background-image: url(http://cdn.leafletjs.com/leaflet-0.4.4/images/zoom-in.png);
margin-bottom: 5px;
}
.leaflet-control-zoom-out {
- background-image: url(images/zoom-out.png);
+ background-image: url(http://cdn.leafletjs.com/leaflet-0.4.4/images/zoom-out.png);
}
.leaflet-control-layers {
@@ -157,7 +157,7 @@
border-radius: 8px;
}
.leaflet-control-layers a {
- background-image: url(images/layers.png);
+ background-image: url(http://cdn.leafletjs.com/leaflet-0.4.4/images/layers.png);
width: 36px;
height: 36px;
}
View
@@ -0,0 +1,44 @@
+.leaflet-vml-shape {
+ width: 1px;
+ height: 1px;
+ }
+.lvml {
+ behavior: url(#default#VML);
+ display: inline-block;
+ position: absolute;
+ }
+
+.leaflet-control {
+ display: inline;
+ }
+
+.leaflet-popup-tip {
+ width: 21px;
+ _width: 27px;
+ margin: 0 auto;
+ _margin-top: -3px;
+
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
+ }
+.leaflet-popup-tip-container {
+ margin-top: -1px;
+ }
+.leaflet-popup-content-wrapper, .leaflet-popup-tip {
+ border: 1px solid #bbb;
+ }
+
+.leaflet-control-zoom {
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#3F000000',EndColorStr='#3F000000');
+ }
+.leaflet-control-zoom a {
+ background-color: #eee;
+ }
+.leaflet-control-zoom a:hover {
+ background-color: #fff;
+ }
+.leaflet-control-layers-toggle {
+ }
+.leaflet-control-attribution, .leaflet-control-layers {
+ background: white;
+ }
View
@@ -6,6 +6,9 @@ table tr td {border: 1px solid #CCC; text-align: left; margin: 0; padding: 6px 1
table td b {color:#333333;}
span.string p {display:inline-block; width:auto!important; font-size:13px;}
section.nav div.right {min-height:100px!important;}
+div.right .blue.button.download {position:relative; display:inline; top:auto; right:auto; float:none; padding-right:18px!important;}
+
+.leaflet-popup-content p {width:auto!important;}
/* Fonts for Firefox */
header nav a {font:bold 12px "Segoe UI Bold", "Helvetica Neue", "Helvetica", Arial;}
@@ -15,7 +18,8 @@ h3 {font: bold 23px/24px "Segoe UI Bold", "Helvetica Neue", "Helvetica", Arial!i
h5 {font: bold 19px/15px "Segoe UI Bold", "Helvetica Neue", "Helvetica", Arial!important;}
/* Things for examples */
-form.example {position:absolute!important; top:25px; right:25px; margin:0!important; width:150px!important;
+form.example {
+ position:absolute!important; top:25px; right:25px; margin:0!important; width:150px!important;
padding:10px!important; background:white; -webkit-border-radius:3px; -moz-border-radius:3px; border-radius:3px; border:1px solid #CCC;
z-index:1000;
}
View
@@ -6,13 +6,13 @@
<title>CartoDB + Leaflet | Custom infowindow</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>body,html {width:100%; height:100%; margin:0; padding:0;} #map {position:relative; margin:0; width:100%; height:100%;}</style>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
- <!--[if IE]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
+ <link rel="stylesheet" href="../css/leaflet.css" />
+ <!--[if IE]><link rel="stylesheet" href="../css/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/cartodb-leaflet.css" rel="stylesheet" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="../js/leaflet-0.4.0.js"></script>
- <script type="text/javascript" src="../js/wax.leaf.min-7.0.0dev1-touched.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+ <script src="../js/leaflet.js"></script>
+ <script type="text/javascript" src="../js/wax.leaf.min.js"></script>
<script type="text/javascript" src="../dist/cartodb-leaflet-min.js"></script>
<script type="text/javascript" src="../dist/cartodb-popup-min.js"></script>
View
@@ -6,13 +6,13 @@
<title>CartoDB + ESRI</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {height:100%;}</style>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
- <!--[if IE]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
+ <link rel="stylesheet" href="../css/leaflet.css" />
+ <!--[if IE]><link rel="stylesheet" href="../css/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/cartodb-leaflet.css" rel="stylesheet" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="../js/leaflet-0.4.0.js"></script>
- <script type="text/javascript" src="../js/wax.leaf.min-7.0.0dev1-touched.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+ <script src="../js/leaflet.js"></script>
+ <script type="text/javascript" src="../js/wax.leaf.min.js"></script>
<script type="text/javascript" src="../dist/cartodb-leaflet-min.js"></script>
<script type="text/javascript" src="../dist/cartodb-popup-min.js"></script>
@@ -25,6 +25,9 @@
, streetMapUrl = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}'
, streetMapLayer = new L.TileLayer(streetMapUrl, { maxZoom: 19, attribution: 'Tiles: &copy; Esri' });
+ map.setView(new L.LatLng(36.204824, 138.252924), 6).addLayer(streetMapLayer,true);
+
+
// Create a CartoDB popup
var popup = new L.CartoDBPopup();
@@ -60,7 +63,6 @@
// Adding layer to map
map.addLayer(earthquakes,false);
- map.setView(new L.LatLng(36.204824, 138.252924), 6).addLayer(streetMapLayer,true);
}
</script>
View
@@ -6,13 +6,13 @@
<title>CartoDB + Leaflet | Hover line</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {height:100%;}</style>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
- <!--[if IE]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
+ <link rel="stylesheet" href="../css/leaflet.css" />
+ <!--[if IE]><link rel="stylesheet" href="../css/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/cartodb-leaflet.css" rel="stylesheet" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
- <script type="text/javascript" src="js/wax.leaf.min-7.0.0dev1-touched.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+ <script src="../js/leaflet.js"></script>
+ <script type="text/javascript" src="../js/wax.leaf.min.js"></script>
<script type="text/javascript" src="../dist/cartodb-leaflet-min.js"></script>
<script type="text/javascript" src="../dist/cartodb-popup-min.js"></script>
@@ -43,27 +43,21 @@
// Show the hover polyline if it is a different feature
if (data.cartodb_id != polyline.cartodb_id) {
map.removeLayer(polyline);
- polyline.off("featureparse");
- polyline = new L.GeoJSON(null);
+ polyline = new L.GeoJSON(JSON.parse(data.geometry), {
+ style: function (feature) {
+ return polyline_style;
+ }
+ }).addTo(map);
polyline.cartodb_id = data.cartodb_id;
-
- // Change style
- polyline.on("featureparse", function (e) {
- e.layer.setStyle(polyline_style);
- });
-
- polyline.addGeoJSON(JSON.parse(data.geometry));
- map.addLayer(polyline);
}
},
featureOut: function() {
document.body.style.cursor = "default";
// Hide and remove in any case the hover polyline
polyline.cartodb_id = null;
- polyline.off("featureparse");
- map.removeLayer(polyline)
+ map.removeLayer(polyline);
},
featureClick: function(ev,latlng,pos,data) {
// Stop propagation
View
@@ -6,16 +6,17 @@
<title>CartoDB + Leaflet | Hover point</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {height:100%;}</style>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
- <!--[if IE]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
+ <link rel="stylesheet" href="../css/leaflet.css" />
+ <!--[if IE]><link rel="stylesheet" href="../css/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/cartodb-leaflet.css" rel="stylesheet" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
- <script type="text/javascript" src="js/wax.leaf.min-7.0.0dev1.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+ <script src="../js/leaflet.js"></script>
+ <script type="text/javascript" src="../js/wax.leaf.min.js"></script>
<script type="text/javascript" src="../dist/cartodb-leaflet-min.js"></script>
<script type="text/javascript" src="../dist/cartodb-popup-min.js"></script>
+
<script type="text/javascript">
function initialize() {
var map = new L.Map('map').setView(new L.LatLng(40.718379593199494, -73.99772644042969), 14)
@@ -45,13 +46,12 @@
map.removeLayer(point);
point = new L.GeoJSON(JSON.parse(data.geometry),{
- pointToLayer: function(latlng) {
+ pointToLayer: function(feature,latlng) {
return new L.CircleMarker(latlng, hover_style);
}
- });
+ }).addTo(map);
+
point.cartodb_id = data.cartodb_id;
-
- map.addLayer(point);
}
},
featureOut: function() {
@@ -6,14 +6,13 @@
<title>CartoDB + Leaflet | Hover polygon</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>body,html {width:100%; height:100%; margin:0; padding:0; overflow:hidden;} #map {height:100%;}</style>
- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
- <!--[if IE]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.ie.css" /><![endif]-->
+ <link rel="stylesheet" href="../css/leaflet.css" />
+ <!--[if IE]><link rel="stylesheet" href="../css/leaflet.ie.css" /><![endif]-->
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/cartodb-leaflet.css" rel="stylesheet" type="text/css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
- <script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
- <!--script type="text/javascript" src="../js/wax.leaf.min-6.2.3-touched.js"></script-->
- <script type="text/javascript" src="../js/wax.leaf.min-7.0.0dev1-touched.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
+ <script src="../js/leaflet.js"></script>
+ <script type="text/javascript" src="../js/wax.leaf.min.js"></script>
<script type="text/javascript" src="../dist/cartodb-leaflet-min.js"></script>
<script type="text/javascript" src="../dist/cartodb-popup-min.js"></script>
@@ -44,18 +43,13 @@
// Show the hover polygon if it is a different feature
if (data.cartodb_id != polygon.cartodb_id) {
map.removeLayer(polygon);
- polygon.off("featureparse");
- polygon = new L.GeoJSON(null);
+ polygon = new L.GeoJSON(JSON.parse(data.geometry), {
+ style: function (feature) {
+ return polygon_style;
+ }
+ }).addTo(map);
polygon.cartodb_id = data.cartodb_id;
-
- // Change style
- polygon.on("featureparse", function (e) {
- e.layer.setStyle(polygon_style);
- });
-
- polygon.addGeoJSON(JSON.parse(data.geometry));
- map.addLayer(polygon);
}
},
featureOut: function() {
Oops, something went wrong.

0 comments on commit 51c5136

Please sign in to comment.