Skip to content

setLeftLayers adds layers to the right pane #53

Open

Description

@gmaclennan

I've updated the lib so that getContainer is replaced by getPane (leaflet 1.9)

const sbs = L.control.sideBySide([], []).addTo(this.map);
const layer1 = L.geoJSON(MYGEOJSONOBJECT01, { style: { color: 'green', weight: 2, opacity: 1 } }).addTo(this.map);
const layer2 = L.geoJSON(MYGEOJSONOBJECT02, { style: { color: 'red', weight: 2, opacity: 1 } }).addTo(this.map);
sbs.setLeftLayers(layer1);
sbs.setRightLayers(layer2);

Both layers are on the right pane...

I've tried setting them up directly in the sideBySide() function for the same result.

EDIT: setxxxLayers individually work, but not both at the same time. So I either get left pane working with blank right pane or the other way around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions