Closed prebm closed 9 years ago
Should we be going for L.GridLayer from leaflet (next version) instead?
As I understand it UTFGrids are kind of a grid layer, so I guess they would fit as subclass of L.GridLayer. Some of the inherited functions do not work at the moment - a fact I forgot in yesterdays testing. Would you need to rewrite the whole plugin to make everything work correctly?
Perhaps... Tell me more about setUrl, does it let you change the URL of the utfgrid tiles?
The setUrl function let you change the URL of the utfgrid tiles and redraws the utfgrid tiles from the new URL.
In fact, with the new redraw function, the setUrl() can just be copied from L.TileLayer and added to Leaflet.utfgrid:
setUrl: function (url, noRedraw) {
this._url = url;
if (!noRedraw) {
this.redraw();
}
return this;
},
This is working with Leaflet 0.7.3 but not with Leaflet 0.8. The version from my pull request is working with both versions.
Closing because of new pull request #33
Extending L.TileLayer instead of L.Class to obtain setUrl() functionallity