glenrobertson/leaflet-tilelayer-geojson — pull request #7 by nrenner (2013-05-10 16:27:43+00:00)
Title: generic vector layer support + removing tiles

I added some changes to suit my needs, that might be useful for others, too:

1. Supports any vector layer via factory method (options.layerFactory), GeoJSON remains the default.
2. Removes tiles outside viewport (depending on unloadInvisibleTiles option)
3. Uses _reset instead of _resetCallback (replaced in Leaflet master, also works with v0.5.1)

As a consequence of 1. and 2. the raw _data array is replaced with a child vector layer per tile. Deduplication now relies on the layer's filter and is separated into L.TileLayer.Vector.Unclipped (not sure about the naming).

See demo at http://nrenner.github.io/leaflet-tilelayer-vector/

Remaining tasks:
* Not sure how the reunioning branch fits into this. Ideally that would be working with Leaflet's L.Path classes instead of GeoJSON features.
* TileLayer.Ajax still expects a JSON response, would need to support other formats/response types, I currently use a replacement, see [branch binary](https://github.com/nrenner/leaflet-tilelayer-vector/blob/binary/TileLayer.Ajax.Binary.js).
* Didn't rename TileLayer.GeoJSON.js to TileLayer.Vector.js yet for better comparison; renaming the project would also make sense

So, what do you think?