[postgis-users] postgis mapfile php
Jonathan W. Lowe
jlowe at giswebsite.com
Mon Apr 7 00:12:32 PDT 2008
On Sun, 2008-04-06 at 17:19 -0700, nickthegreek- wrote:
>
>
> nickthegreek- wrote:
> >
> > i have map who takes the data from a database
> >
> > in the database there is a column "name"
> >
> > my data are be shown with
> >
> > LAYER
> > NAME "country"
> > TYPE POLYGON
> > STATUS ON
> > CONNECTIONTYPE postgis
> > CONNECTION "host=localhost dbname=postgis user=postgres
> > password=d3klw7 port=5432"
> > DATA "the_geom from europe_country using unique gid using
> > srid=-1"
> > LABELITEM "name"
> >
> > what i wanna is.. i have a menu who takes all the countries from the
> > column name...
> > if i select a country
> >
> > eg.greece
> >
> > how i could change the statement in the mapfile
> > DATA "the_geom from europe_country using unique gid using srid=-1"
> > with the statement
> > DATA "the_geom from europe_country where name=greece using unique gid
> > using srid=-1" so to be shown only greece??? pls help me..i need to finish
> > my diploma with taht
> >
> >
> > eg..i knnow if we wanna to change the status of a layer we use that
> > $this_layer = $map->getLayerByName('europe cities');
> > $this_layer->set('status', MS_ON);
> >
> > sth similar like the above to change the statement of data?
> >
>
>
> also.. i wanna know sth else.. in the mapfile ..i have in data
> DATA "the_geom from europe_country using unique gid using srid=-1"
>
> if i changed it in DATA "the_geom from europe_country where name="Greece"
> using unique gid using srid=-1"
Might be the single vs double quotes -- try this instead:
DATA "the_geom from europe_country where name='Greece'
using unique gid using srid=-1"
> it should be shown greece ?? right?
>
> but nothing is shown ..it gives me error ...knows anyone what is wrong?
More information about the postgis-users
mailing list