We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@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.
The text was updated successfully, but these errors were encountered:
It's not documented anywhere but I had to create 2 panes on the map:
this.map.createPane('left'); this.map.createPane('right');
Then assign my geojson data to either one:
const layer = L.geoJSON(map, { style: { color, weight: 2, opacity: 1 }, pane: 'left' }).addTo(this.map);
Sorry, something went wrong.
No branches or pull requests
@gmaclennan
I've updated the lib so that getContainer is replaced by getPane (leaflet 1.9)
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.
The text was updated successfully, but these errors were encountered: