jjimenezshaw / Leaflet.Control.Layers.Tree

a Tree Layers Control for Leaflet
https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/basic.html
BSD 3-Clause "New" or "Revised" License
146 stars 36 forks source link

WFS issue #34

Closed Matt914 closed 3 years ago

Matt914 commented 3 years ago

` <!doctype html>

Webmap Comune di Colleferro
`
jjimenezshaw commented 3 years ago

@Matt914 first some comments:

Related to your problem, WFSLayer is loaded asynchronously. So it is not there when you create the tree. You could: a) wait somehow until you have it to create the tree. b) embed it in a different layer (maybe a layerGroup), and insert this container in the tree. When your json is loaded, insert it in the container. I am not sure if this will work.

Matt914 commented 3 years ago

Hi, I edited my first post and added everything I've done so far. I edited with a non-async WFS request and was able to load the layer and defined my layers. What can I do to perform two or more ajax calls? If I understand correctly the problem is with the Callback request because it was already used with the first WFS. I hope everything is a bit more readable now.