Problem/Motivation

The module does not pass the configurable layer type (base/overlay) to the Leaflet module in leaflet_layers_leaflet_map_info(), causing overlay layers be treated as base layers.

Steps to reproduce

Add an "overlay" type layer and notice it being rendered as a base layer in the map bundle.

Proposed resolution

Pass the type to Leaflet in the hook implementation. I can't put up a patch right now, but adding

if ($layerEntity->getSetting('layer_type', FALSE) != FALSE) {
  $layerItem['layer_type'] = $layerEntity->getSetting('layer_type');
}

on line 93 of leaflet_layers.module does the job.

Remaining tasks

Put up a patch and merge.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

jensschuppe created an issue. See original summary.

  • andeersg committed 5464a81 on 1.0.x
    Issue #3198782 by jensschuppe: Layer type not passed to Leaflet
    
andeersg’s picture

Status: Active » Fixed

Good catch!

I have implemented your fix now, it will be in the next release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.