Skip to content

Instantly share code, notes, and snippets.

View calvinmetcalf's full-sized avatar

Calvin Metcalf calvinmetcalf

View GitHub Profile
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0;}
#map{ height: 100% }
</style>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0;}
#map{ height: 100% }
</style>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />

Quadtree!

A quadtree of 60k points with its bounds displayed. The usefulness of this is extremely debatable.

<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0;}
#map{ height: 100% }
</style>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css" />
@calvinmetcalf
calvinmetcalf / Readme.md
Created February 15, 2013 18:51
quadtrees, what are they good for?

So hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that.

@calvinmetcalf
calvinmetcalf / README.md
Created February 15, 2013 19:44
Quadtree Madness Round 2

So hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that. Hit the other button in the bottom left or right click to remove the query and show all of the markers.

@calvinmetcalf
calvinmetcalf / README.md
Created February 15, 2013 19:55
Quadtree Madness Round 2

So hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that. Hit the other button in the bottom left or right click to remove the query and show all of the markers.

@calvinmetcalf
calvinmetcalf / README.md
Created February 15, 2013 20:10
Quadtree Madness Round 2

So hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that. Hit the other button in the bottom left or right click to remove the query and show all of the markers. I also did versions with Icon Markers and Marker Clusters

@calvinmetcalf
calvinmetcalf / README.md
Last active December 13, 2015 19:29
Quadtree Madness Round 2

So hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that. Hit the other button in the bottom left or right click to remove the query and show all of the markers. I also did versions with Icon Markers and Marker Clusters

@calvinmetcalf
calvinmetcalf / README.md
Last active December 13, 2015 20:08
Rtree Madness

At the suggestion of Vladimir I modified the Quadtree demo to use Rtrees, otherwise the same. You'll notice the code is much shorter as the Rtree is really designed for what I'm doing.

Hit the button in the bottom left to start adding points, then if you hold down shift and draw a box it'll running a bounding box query on that area and limit the map to that. Hit the other button in the bottom left or right click to remove the query and show all of the markers. I also did quadtree versions with Icon Markers and Marker Clusters