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

MOHAMMED SADIQUE SHADAB sadiqueshadab at gmail.com
Mon Feb 16 07:51:59 EST 2009


On 2/16/09, MOHAMMED SADIQUE SHADAB <sadiqueshadab at gmail.com> wrote:
> 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
>


More information about the mapserver-users mailing list