[postgis] mapserver connect to postgis?
s8854617
s8854617 at sinamail.com
Tue Jan 1 23:59:38 PST 2002
Dear Sir:
I am a student in Taiwan. I have a problem with my mapserver.
my postgis table is following:
testdb=# \d roads
Table "roads"
Attribute | Type | Modifier
-----------+----------+----------
gid | integer |
geom | geometry |
Indices: roads_idx1,
roads_idx2
My data is following:
testdb=# select * from roads;
gid | geom
-----+-----------------------------------
1 | SRID=-1;LINESTRING(1 1,5 5,11 20)
(1 row)
My map file is following:
NAME EX3
SIZE 600 600
EXTENT 1.0 1.0 30.0 30.0
LAYER
CONNECTIONTYPE postgis
NAME "Roads"
CONNECTION "user=postgres dbname=testdb"
DATA "geom from roads"
STATUS ON
TYPE LINE
FILTER "gid > 0"
CLASS
EXPRESSION ([gid] > 0)
COLOR 255 0 0
END
END
END # Fim do MapFile
And my html file is following:
<html>
<head>
<title>My First Test for Mapserver</title>
</head>
<body>
<img border="1" src="/cgi-bin/mapserv?map=/var/www/html/itasca/ex3.map&mode=
map">
</body>
</html>
It seems to be OK for me. But I try to browse the HTML file, it
just show nothing but a square. Could you tell me where I did wrong?
Or tell me how to make sure the Mapserver connect to PostGIS and
retrive data successful?
Thank Your help
Whang Yeong Chong
==================================================================
新浪網.免費電子信箱 http://www.sinamail.com
------------------------ Yahoo! Groups Sponsor ---------------------~-->
PC to PC calling with 3-way conferencing. Only
$11.95/yr at CrystalVoice! Free trial. Click Here!
http://us.click.yahoo.com/4SQRwC/RYfDAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list