[mapserver-users] How to place a dynamic object in a map

MOHAMMED SADIQUE SHADAB sadiqueshadab at gmail.com
Sun Feb 15 21:15:36 PST 2009


Hi,
    i just want to place a dynamic object in map using POSTGRESQL.
   when i place an object statically using POINT in mapfile,i am getting a
point as specified in *attachment* please see that too

 but when i want to place the same object dynamically i am not able to do
that,
For that i have created one table in postgresql as shown below

*create table geometry(geom varchar,srid int);
insert into geometry values('POINTS(0 0)',2);
select * from geometry;
    geom    | srid
------------+------
 POINT(0 0) |    2


*i have linked the above database using mapfile as

*# This is our "Dynamic Object" mapfile
NAME "object"
SIZE 800 600
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00
WEB
TEMPLATE "/opt/fgs/www/htdocs/db.html"
IMAGEPATH "/opt/fgs/www/htdocs/tmp/"
IMAGEURL "/tmp/"
END
LAYER
NAME "data"
CONNECTIONTYPE POSTGIS
NAME "postgres"
CONNECTION "host=localhost port=5432 dbname=postgres user=postgres
password=hellopostgres "
DATA "geom from geometry"
STATUS ON
TYPE POINT
CLASS
STYLE
#SYMBOL 'circle'
SIZE 30
COLOR 229 100 225
END
END
FEATURE
END
END
 SYMBOL
       TYPE ellipse
        FILLED true
POINT
 10 10
             END
        END
END
END
END
END
END
*
i am not getting any point on the map, it shows only  the blank image
without point.

will anyone help me to overcome this problem and make me clear my connection
is correct

thanks

Regards
SHADAB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090216/c04e8fa8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: staticmapoutput.png
Type: image/png
Size: 231546 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090216/c04e8fa8/attachment.png>


More information about the MapServer-users mailing list