[OpenLayers-Dev] OpenLayers + MapServer + Postgis <problem>

E.Stefanakis eipd at otenet.gr
Sun Apr 1 17:32:08 EDT 2007


Hi!

I have two layers defined as follows...

var mslayer1 = new OpenLayers.Layer.WMS( "SHAPEFILE LAYER", 
    "http://83.212.51.160/cgi-bin/mapserv.exe?map=/ms4w/apps/emmanuel/htdocs/grdata_nomoi_wgs84.map", {'layers': 'NOMOI' , 'format':'image/png'}); 
var mslayer2 = new OpenLayers.Layer.WMS( "POSTGIS LAYER", 
    "http://83.212.51.160/cgi-bin/mapserv.exe?map=/ms4w/apps/emmanuel/htdocs/grdata_nomoi_wgs84.map", {'layers': 'MATHITES' , 'format':'image/png'}); 


and the following map file:

MAP
  IMAGETYPE      png
  EXTENT         19.341085 34.809638 29.577942 41.757412
  SIZE           500 500
  SHAPEPATH      "c:/emmanuel/grdata"
  IMAGECOLOR     255 255 255
  UNITS DD

PROJECTION
   "init=epsg:4326"
  END

SYMBOL
   NAME "Circle"
   FILLED true
   TYPE ellipse
   POINTS 1 1 END
END


  # LAYER SHAPEFILE ---------
  LAYER
    NAME         NOMOI
    DATA         NOMOI_wgs84
    STATUS       OFF
    TYPE         POLYGON

    CLASS
      NAME       "The Greek Prefectures"
      STYLE
        COLOR        200 200 200
        OUTLINECOLOR 32 32 32
      END
    END
  END # 
 
END # 


# Layer POSTGIS -----------

 LAYER # Mathites in PostGIS
   NAME         MATHITES
   STATUS ON
   TYPE POINT
   CONNECTIONTYPE POSTGIS
   CONNECTION "dbname=postgis host=localhost
                              user=postgres password=postgres port=5432"
   DATA "the_geom from (select the_geom from mathites_wgs84 where id <10)"   

    CLASS
       NAME       "Mathites"
       STYLE  
          SYMBOL "Circle"
          SIZE 3
          COLOR        0 0 200
       END
    END
  
    PROJECTION
      "init=epsg:4326"
    END
 
 END

#End of Layer ---------------

END


=================

The SHAPEFILE layer works fine! Howver I cannot see the POSTGIS layer... 
I get an error message "declare mycursor binary cursor..."

Any suggestion would be greatly appreciated !

Emmanuel.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070402/78fb5451/attachment.html


More information about the Dev mailing list