<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br><br>I assume the getcapabilities request is working OK?<br><br>What happens when you open this in your browser:<br><a href="http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map?service=WMS&version=1.3.0&request=getcapabilities">http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map?service=WMS&version=1.3.0&request=getcapabilities</a><br><br>& what happens if you initialise the CRS in the mapfile with just the epsg code instead of the full WKT?<br><br>I assume you are looking to do something like this?<br><a href="http://121.73.69.119/osm_nz.html">http://121.73.69.119/osm_nz.html</a><br><br><br>Cheers,<br><br>   Brent Wood<br><br>--- On <b>Mon, 8/27/12, Henrique Rennó <i><henrique.renno@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px;
 padding-left: 5px;"><br>From: Henrique Rennó <henrique.renno@gmail.com><br>Subject: Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile<br>To: "李杨" <gisyangli@gmail.com><br>Cc: mapserver-dev@lists.osgeo.org, mapserver-users@lists.osgeo.org<br>Date: Monday, August 27, 2012, 4:56 AM<br><br><div id="yiv2095006144">It seems your url is set wrong as mode is given twice. You have to pass layer=layer_name<div><br><div class="yiv2095006144gmail_quote">2012/8/26 李杨 <span dir="ltr"><<a rel="nofollow" ymailto="mailto:gisyangli@gmail.com" target="_blank" href="/mc/compose?to=gisyangli@gmail.com">gisyangli@gmail.com</a>></span><br>
<blockquote class="yiv2095006144gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I try to load a postgis data layer on my mapfile, have problem when configure the mapfile done, then visit it using "<a rel="nofollow" target="_blank"  href="http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map">http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map</a>" on the browser address. , only a blank blue image return, with no expected dot info.<br>

<br>I can not figure out which step is have problem.<br><br>Provide background info:<br><br>ogrinfo for the database  table:<br><br>jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1 user=osm  password=osm dbname=osm port=5432" osm_new_mainroads -summary<br>

INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm port=5432'<br>      using driver `PostgreSQL' successful.<br><br>Layer name: osm_new_mainroads<br>Geometry: Line String<br>Feature Count: 9704<br>

Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784, 4190971.740014)<br>Layer SRS WKT:<br>PROJCS["Popular Visualisation CRS / Mercator (deprecated)",<br>    GEOGCS["Popular Visualisation CRS",<br>

        DATUM["Popular_Visualisation_Datum",<br>            SPHEROID["Popular Visualisation Sphere",6378137,0,<br>                AUTHORITY["EPSG","7059"]],<br>            TOWGS84[0,0,0,0,0,0,0],<br>

            AUTHORITY["EPSG","6055"]],<br>        PRIMEM["Greenwich",0,<br>            AUTHORITY["EPSG","8901"]],<br>        UNIT["degree",0.01745329251994328,<br>

            AUTHORITY["EPSG","9122"]],<br>        AUTHORITY["EPSG","4055"]],<br>    UNIT["metre",1,<br>        AUTHORITY["EPSG","9001"]],<br>    PROJECTION["Mercator_1SP"],<br>

    PARAMETER["central_meridian",0],<br>    PARAMETER["scale_factor",1],<br>    PARAMETER["false_easting",0],<br>    PARAMETER["false_northing",0],<br>    AUTHORITY["EPSG","3785"],<br>

    AXIS["X",EAST],<br>    AXIS["Y",NORTH]]<br>FID Column = id<br>Geometry Column = geometry<br>osm_id: Integer (0.0)<br>name: String (255.0)<br>type: String (255.0)<br>tunnel: Integer (5.0)<br>bridge: Integer (5.0)<br>

oneway: Integer (5.0)<br>ref: String (255.0)<br>z_order: Integer (5.0)<br>jack@jack-Vostro-1450:/usr/lib/cgi-bin$ <br><br>--------------------------------------------------------------------------------------------<br>.map(uing in the link above : osg-google.map) info for configure:<br>

<br>MAP<br>NAME places1<br>STATUS ON<br>SIZE 800 800<br>EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014<br>UNITS meters<br>IMAGECOLOR 153 179 204<br><br><br>WEB<br>    IMAGEPATH "/var/www/output"<br>

    IMAGEURL "/output/"<br>END<br><br>LAYER<br> STATUS DEFAULT<br> NAME "places1"<br> DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"<br> TYPE POINT<br> CONNECTIONTYPE postgis<br>

 CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"<br> CLASS<br>NAME "places1_color"<br>COLOR 255 215 0<br>  END<br>END<br><br>END<br><br>-------------------------<br>for a explanation , whenever set  "DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"",<br>

DATA "geometry from osm_new_mainroads", or <br>DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875<br><br>is the same , a blank image return<br>-------------------------------------------------------<br>

massperv version info:<br><br>./mapserv -v<br>MapServer version 6.0.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE<br>

<br><br><br>I try to experiment it in two different laptop and can not get expected result.<br><br>Please those with experience help me., this problem qurrall  me a lot this weeked.<br><br>Thanks a lot. <br><span class="yiv2095006144HOEnZb"><font color="#888888"><br>
<br>-- <br>
<div style="text-align:left;"><span style="">Yang Li</span><div>GIS Developer</div><div>P.R.China</div><div><br></div></div><br>
</font></span><br>_______________________________________________<br>
mapserver-users mailing list<br>
<a rel="nofollow" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Henrique<br><br>
</div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></td></tr></table>