Skip to content

Instantly share code, notes, and snippets.

View glenrobertson's full-sized avatar
💭
Taking the specifications from the customer to the Software Engineers

Glen Robertson glenrobertson

💭
Taking the specifications from the customer to the Software Engineers
View GitHub Profile
@glenrobertson
glenrobertson / geojson-tiles.js
Created December 7, 2012 00:57 — forked from lxbarth/geojson-tiles.js
GeoJSON Leaflet Tile Layer
// Load tiled GeoJSON and merge into single geojson hash.
// Requires jQuery for jsonp.
L.TileLayer.GeoJSON = L.TileLayer.extend({
_geojson: {"type":"FeatureCollection","features":[]},
_requests: [],
geojson: function() {
if (this._geojson.features.length) return this._geojson;
for (k in this._tiles) {
var t = this._tiles[k];
if (t.geojson && t.geojson.features) {