Skip to content

TileLayer stacking order not respected when layer opacity < 1 #1790

@russmo

Description

@russmo

Related to #1667 and #1474

See this JSFiddle

http://jsfiddle.net/Rvgsx/10/

showing several test cases showing one tileLayer of an OSM basemap and two overlay tileLayers. Basically, things work fine if no opacity is set on the layers or all layers have an opacity less than 1. Any layers anywhere within the stack with an opacity of 1 (or not set at all) will occlude any overlays above them with an opacity less than 1. Setting zIndex option on layers without opacity makes map honor the expected stacking order.

As mentioned in the other issue comment threads, the current behavior is different from 0.5.1, where the order layers were added to the map was respected with mixed opacity tileLayers.

Does this need to be fixed internally, or should users have to explicitly set a zIndex option or setZIndex() for all tileLayers that might use opacity other than 1?

screen shot 2013-06-25 at 2 05 13 pm

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions