Open nmatviko opened 11 years ago
I'm not sure, and I'm afraid that I'm not actively maintaining this repository right now. I would suggest taking a look at the "Network" tab on your debugger and find the request that is being made to the WFS server -- it should make the request once the layer is added to your map. I noticed that you're kinda spoofing a BBOX param into the request -- I would just make sure that you're getting the right response.
Also -- the layer expects to receive a GeoJSON FeatureCollection -- not just a single Feature. This may be an issue.
I have been pinging my WFS and it returns a simple geoJSON String. When i print out my wfsLayer, it says that the geoJson is null?? Any idea of what is happening? I just used the code from the example:
var wfsLayer = new L.GeoJSON.WFS("http://1.4.5.6:8080/test/test", "feature&BBOX=-17.6774861,85.5654917,-11.6632806,85.5699611", { pointToLayer: function(latlng) { return new L.CircleMarker(latlng); }, popupObj: new JadeContent("templates/example.jade"), popupOptions: { maxWidth: 530, centered: false }, hoverFld: "name" });
This is what I get back when i ping my WFS:
{ type:"feature", properties: { name: "Hello World!", description: "My first popup!" }, geometry: { type:"Point", coordinates: [35.23,-117.65] } }
And Here is the message i get when i ping my WFS: