Skip to content

Instantly share code, notes, and snippets.

@pere
Created October 1, 2012 08:57
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 pere/3810427 to your computer and use it in GitHub Desktop.
Save pere/3810427 to your computer and use it in GitHub Desktop.
<!Doctype html>
<html>
<head>
<title>311 Density</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://lully.snv.jussieu.fr/gbif/mapping/jqueries/new_leaflet/leaflet.css" />
<!--OOOOOLD LEAFLET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-->
<script src="http://lully.snv.jussieu.fr/gbif/mapping/jqueries/leaflet-src.js"></script>
<!--OOOOOLD LEAFLET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-->
<script src="http://lully.snv.jussieu.fr/gbif/mapping/jqueries/gbif/mapping/test_maps/wax.leaf.min.js"></script>
<style>
#map {
width:700px;
height:700px
}
</style>
</head>
<body>
<div id="map" style='width:700px,height:700px'></div>
</body>
<script>
map = new L.Map('map',{
center: new L.LatLng(0,0,2),
zoom: 5
//layers: [cloudmade]
});
wax.tilejson("http://www.gbif.fr/mbtiles/datapublisher_3/metadata.jsonp",
function(tilejson) {
var my_layer = new wax.leaf.connector(tilejson);
map.addLayer(my_layer)
interaction_1=wax.leaf.interaction(my_layer)
.map(map)
.tilejson(tilejson)
.on({
on: function(o) {
if (o.e.type !== 'mousemove')
{
alert('datapublisher_3')
}
}
})
})
wax.tilejson("http://lully.snv.jussieu.fr/gbif/mapping/mbtiles/datapublisher_23/metadata.jsonp",
function(tilejson) {
var my_layer = new wax.leaf.connector(tilejson);
map.addLayer(my_layer)
interaction_2=wax.leaf.interaction(my_layer)
.map(map)
.tilejson(tilejson)
.on({
on: function(o) {
if (o.e.type !== 'mousemove')
{
alert('datapublisher_23')
console.info(o.data)
}
}
})
})
url='http://a.tiles.mapbox.com/v1/perikut.map-ua7dmxeg.jsonp';
wax.tilejson(url, function(tilejson) {
basemap = new wax.leaf.connector(tilejson);
map.addLayer(basemap,true);
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment