Skip to content

group Two layers in L.control.layers #8860

Answered by Falke-Design
cayenne17 asked this question in Q&A
Discussion options

You must be logged in to vote

Add first the two layers into a LayerGroup and then add the group to the baseLayers:

var OrthoPlanGroup = L.layerGroup([OrthoIGN, OrthoPlanIGN]);
var baseLayers = {
			"OSM": OSM,
			"OSM FR": OSM_FR,
			"Plan IGN": PlanIGN,
			"Ortho IGN": OrthoIGN,
			"Ortho IGNPlan": OrthoPlanGroup
		};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cayenne17
Comment options

Answer selected by cayenne17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants