Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

a) I am running a PostGIS database, and I want to display a Table with a about 500 Points of Interest. The POIs have the projection EPSG 4326.

b) Geoserver is installed, running and connected to my PostGIS database, all fine so far. No errors.

c) I want to display my POIs from my database on a google base map through openlayers and geoserver. - The base map appears, fine so far, but my POI connection to Geoserver just does not work. I have tried all different kind of solutions but unfortunately it just doesn't want to connect to the Geoserver, I guess. - Both, loading my html file with the javascript/html/openlayers commands into my HTDOCS XAMPP folder doesn't work (http://localhost/example.html) and also starting the file through Geoserver "C:\Program Files\GeoServer 2.1.4\data_dir\www" (http://localhost:8080/geoserver/www/example.html) doesn't work either. Both ways, I only see the basemap but no POIs.

Any help is greatly appreciated. Cheers, Tim

My code is the following:

    <title>OpenLayers: Google Layer Example</title>
    <link rel="stylesheet" href="" type="text/css" />
    <link rel="stylesheet" href="" type="text/css" />
    <script src=";sensor=false" type="text/javascript"></script>
    <script src=""></script>
    <script type="text/javascript">
      var map;

      function init() {

        var options = {
                        projection: new OpenLayers.Projection("EPSG:4326"),
                        displayProjection: new OpenLayers.Projection("EPSG:4326"),
                        units: 'm'

        map = new OpenLayers.Map('map', options);

        var gmap = new OpenLayers.Layer.Google(
            "Google Streets",
            {numZoomLevels: 20}

        var wfsLayer = new OpenLayers.Layer.Vector("WFS", {
            strategies: [new OpenLayers.Strategy.BBOX()],
            protocol: new OpenLayers.Protocol.WFS({
                        url:  "http://localhost:8080/geoserver/wfs",
                        featureType: "bochumtest2",
                        featureNS: "",
                        geometryName: "the_geom",
                        srsName: "EPSG:4326",
                        version: "1.1.0"                    


  <body onload="init()">
    <div id="map" class="smallmap"></div>
share|improve this question
what does firebug say? – iant Aug 12 '12 at 13:26
Are you sure that your featureNS: "", correct? – Kliver Max Aug 13 '12 at 6:26
I managed to fix the problem.. my POIs were imported with the incorrect SRID into my postgis database and not correctly transformed to 90013. Thanks for your help anyway guys. – Timothy Dalton Aug 13 '12 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.