[mapserver-dev] How to check problem when load postgis data but no right map return?

李杨 gisyangli at gmail.com
Fri Aug 24 20:04:35 PDT 2012


I use mapserver to load postgis data, but get a blank map, so I don't know
how to check where is the problem.


I enter in the browser "
http://127.0.0.1/cgi-bin/mapserv?&map=/home/jack/Downloads/mapfile.map&mode=map",
just get a blank image.

my mapfile.map is like this:


MAP
NAME places0
STATUS ON
SIZE 420 300
EXTENT -20000000 -20000000 20000000 20000000
UNITS METERS
IMAGECOLOR 255 255 255

WEB
TEMPLATE "template.html"
IMAGEPATH "/var/www/output/"
IMAGEURL "/output/"
END


LAYER
 STATUS default
 GROUP "default"
 TYPE POINT
 CONNECTIONTYPE postgis
 CONNECTION "dbname=osm host=localhost user=osm password=osm port=5432"
 NAME "places0"
 DATA "geometry from (select * from osm_new_places where name is not NULL
order by population asc nulls first) as foo using unique osm_id using
srid=3857"
CLASS
  NAME "places0"
  COLOR 255 215 0
END
END

END

# end of map file
END


---------------------------------------------------------------------------------------


I test in postgres the sentence "select * from osm_new_places where name is
not NULL order by population asc nulls first" will return many results.
Also the CONNECTION define I think is right.

And I can not check wher the problem occured.

Anyone give some advice and method for this?



-- 
Yang Li
GIS Developer
P.R.China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20120825/2d69b494/attachment.html>


More information about the mapserver-dev mailing list