[Geoserver-users] Can´t get WFS vector layer visible in OpenLayers

Hi all,

I’m sorry if this question is asked million times, but I’m in trouble and can’t find the answer. Not sure should this be preferable in OpenLayers mailing-list, but I’ll give it a try.

I can’t get vector layer from GeoServer visible in OpenLayers. I have tried hundred different combination with the code and can’t get it fixed.

The thing is that I manage to get WFS layer visible in the basemap/layers box, but I can’t see it in the map. This probably tells that maybe nothing is wrong with GeoServer but the html/OpenLayers code.

One thing is that I have brought proj4js library since I wan’t the map to be in EPSG:3067.

and in init()

Proj4js.defs[“EPSG:3067”] = “+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs”;

I cannot believe that this would mix the vector data I bring from GeoServer, since it is also in this same coordinate system. Is there some settings I should fix on GeoServer before I serve it to OpenLayers?

Any help is appreciated! Sorry I can’t make the question any clearer. I work with GeoServer 2.3.2 and Windows Server 2008 R2 Datacenter, OL 2.13.

Laura

Hi Laura,
This is probably better aimed at the OpenLayers list as you posit.

However, you can confirm if GeoServer is responding correctly by using something like FireBug to intercept the requests. You’ll be able to see if the response is valid or not.
If necessary, the “demo’s” page of Geoserver allows you to formulate and make XML requests to GeoServer fairly easily.

Cheers,
Jonathan

On 20 August 2013 10:56, Laura Kauria <lacation@anonymised.com> wrote:

Hi all,

I’m sorry if this question is asked million times, but I’m in trouble and can’t find the answer. Not sure should this be preferable in OpenLayers mailing-list, but I’ll give it a try.

I can’t get vector layer from GeoServer visible in OpenLayers. I have tried hundred different combination with the code and can’t get it fixed.

The thing is that I manage to get WFS layer visible in the basemap/layers box, but I can’t see it in the map. This probably tells that maybe nothing is wrong with GeoServer but the html/OpenLayers code.

One thing is that I have brought proj4js library since I wan’t the map to be in EPSG:3067.

and in init()

Proj4js.defs[“EPSG:3067”] = “+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs”;

I cannot believe that this would mix the vector data I bring from GeoServer, since it is also in this same coordinate system. Is there some settings I should fix on GeoServer before I serve it to OpenLayers?

Any help is appreciated! Sorry I can’t make the question any clearer. I work with GeoServer 2.3.2 and Windows Server 2008 R2 Datacenter, OL 2.13.

Laura


Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.