stamen/modestmaps-js — Issue #102: Bring back Map::coerceLayer()
Author: shawnbot
Created: 2012-02-15 00:18:37+00:00
State: open

@tmcw, this one is still biting us in the ass. I get that major revision numbers should be expected to break code, but there are still examples broken in alpha and the errors causes are totally cryptic and difficult to track down—especially if you're not familiar with the code.

`MM.TemplatedLayer` seems like a hasty afterthought, and it feels out of place because the function isn't actually a class constructor: it just returns a new `MM.Layer` instance. This means, among other things, that you can't extend it.

I really liked the flexibility that the old coercion behavior provided. Removing it breaks a bunch of our examples, all of the code in gh-pages, and several projects we're working on that benefit greatly from using the bleeding edge MMJS.

Can we bring it back, please?