[OpenLayers-Users] Displaying Vector Layers through WFS
Odeneho
anthony.tuffour at hackney.gov.uk
Tue Apr 27 11:18:38 EDT 2010
Hi,
I am trying to display vector layers from my WFS created in geoserver in
openlayers application. However, the WMSs display without errors but when I
try to display the vectors via the code below as overlays nothing display in
the map window. I tried a KML example from file but to no avail;
//WFS code:
var wfslayer = new OpenLayers.Layer.Vector("LUL", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://156.61.47.12:8080/geoserver/wfs",
featureType: "TSI_LBH_LUL_STATIONS",
srsName: "EPSG:27700",
version: "1.1.0",
request: "GetFeatures"
})
});
//KML code:
var oKml = new OpenLayers.Layer.Vector("KML", {
projection: map.displayProjection,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "App_Data/kml/HackneyWards.kml",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
})
});
The geoserver is connected to an oracle database which is located on a
different server to the openlayers web application.
Is there anything I am doing wrong?
Thanks in advance.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Displaying-Vector-Layers-through-WFS-tp4969174p4969174.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list