Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

WFS geoJSON= NULL #5

Open
nmatviko opened this issue Apr 5, 2013 · 1 comment
Open

WFS geoJSON= NULL #5

nmatviko opened this issue Apr 5, 2013 · 1 comment

Comments

@nmatviko
Copy link

nmatviko commented Apr 5, 2013

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"
});

map.addLayer(wfsLayer);
console.log(wfsLayer);  

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:

wfs

@rclark
Copy link
Contributor

rclark commented Apr 8, 2013

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants