Wednesday, June 6, 2012

Over the last few days I've been working with Leaflet. It's a lightweight framework for making web-based maps, it's a quick download, and it has the minimum features for making minimal maps. My first issues came almost immediately, when a client wanted the (apparently) unusual and bizarre functionality of being able to turn off layers and turn them on again, without the new layer lying on top of the stacking order and obscuring the stuff that's now beneath it.

Today's gripes about Leaflet, are about L.TileLayer.WMS This class allows you to load tiles from a WMS, as opposed to the WMS-C or TMS supported by L.TileLayer. But it's lacking more functionality once you move beyond the "It loads, send my my check. Next!" degree of complexity.

In this case, the bug reports and my patches at github, speak for themselves. These add missing methods and functionality to WMS layers: the equivalent of mergeNewParams(), a stacking order fix (such as stacking order goes in Leaflet), and the use of {s} subdomain substitutions.

https://github.com/CloudMade/Leaflet/issues/718

https://github.com/CloudMade/Leaflet/issues/735

https://github.com/CloudMade/Leaflet/issues/719

A "more mature" framework such as OpenLayers already has these bugs and issues corrected, but I'm sure that at one time it was this buggy too. Leaflet is working out well in general, though: despite these missing components, it's easier to use than OL for the more minimal stuff such as panning and centering, drawing markers, etc.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.