As written in the manual, when we have multiple base layers on a map:

http://leafletjs.com/examples/layers-control.html

Also note that when using multiple base layers, only one of them should be added to the map at instantiation, but all of them should be present in the base layers object when creating the layers control.

Attached a patch to fix this issue + the instance of layers + map_id in order to simplify map modifications triggering "leaflet.map".

Comments

paolomainardi’s picture

StatusFileSize
new1.09 KB
paolomainardi’s picture

Up

paolomainardi’s picture

Seems that this patch has been integrated, can you confirm ?

tuwebo’s picture

Status: Needs review » Closed (fixed)

Hi,
Patch has been commited, http://drupalcode.org/project/leaflet.git/commit/d842c24.

I have open a feature request #2224089: Allow "overlays layers" TileLayer(s) to be declared in hook_leaflet_map_info(). Not need of feature creation that maybe people should be interested in, changing this status, since it's been commited and fixed.