How to add two geoJSON feature collections in to two layer groups

后端 未结 2 1223
情话喂你
情话喂你 2021-01-06 09:00

I have two geoJSON feature collections that I need to add to the map, and I also want them to be toggled on and off via the layer visibility controllers as shown in http://l

2条回答
  •  鱼传尺愫
    2021-01-06 09:46

    Since you create a layer when loading a GeoJSON, you can add it to the layer control as an Overlay Layer (simply modify that example and replace the cities layer.

提交回复
热议问题