Norkart/Leaflet-MiniMap — pull request #27 by yohanboniface (2013-06-16 08:29:43+00:00)
Title: Add an option to listen to main map baselayer change

The idea is to listen to the [baselayerchange event](https://github.com/Leaflet/Leaflet/blob/master/src/control/Control.Layers.js#L229), fired by Leaflet. I've added an option to control this, and the default is `false` to respect the current behaviour.

As we cannot use a same `TileLayer` instance if both mainMap and miniMap, I've added a `_cloneLayer` method.

And while I was at it, I've called this method on the `initialize`, to make possible to pass an already used baselayer as argument. I don't think it can cost anything, but tell me if I'm wrong. If you agree, we should remove the warning in the README.

What do you think?

Thanks :)

Yohan