Hi Cristian,

have you add your view in the geometry_columns table?

Walter

Cristian Vera ha scritto:
> Dear list,
>
> we want to load a layer from a database view, but we can't do it yet.
>
> we have the next .map file config for this
>
> LAYER
>         NAME "layername"
>         TYPE POINT
>         CONNECTIONTYPE POSTGIS
>         CONNECTION "user=* password=* dbname=* host=*"
>         DATA "the_geom from (select * from mytable) USING SRID=4326"
>         STATUS ON
>         TRANSPARENCY 100
>         TEMPLATE void
>         PROJECTION
>             "init=epsg:4326"
>         END
>         METADATA
>             "DESCRIPTION" "My description"
>             "RESULT_HEADERS" "field1, field2,  field3, field N"
>             "RESULT_FIELDS" "field1, field2, field3, field N"
>             "LAYER_ENCODING"  "UTF-8"
>             "ows_title"  'layername'
>         END
>         CLASS
>             NAME "myclassname"
>             COLOR 0 227 255
>             OUTLINECOLOR 0 0 0
>             SYMBOL "circulo"
>             SIZE 6
>         END
>     END
>
>     Our database view definiton sql is:
>
>     SELECT b.field1 AS nameb1, c.field1 AS namec1, c.field2 AS namec2 ,
> c.field3 AS namec3, c.the_geom, c.gid   FROM tablec c, tableb b WHERE
> contains(b.the_geom, c.the_geom) ORDER BY b.nameb1;
>
>     by the way, we are using pmapper4-beta1, and we already read the faq of
> pmapper for try to doing this.
>
>     i hope you can help us,
>
>     Regards
>
>     Cristian,
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> pmapper-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>   


-- 

Walter Lorenzetti
email: [email protected]
skype: aiki74
Cell: (+39) 347-6597931  Tel+Fax: (+39) 0583 926684
Via di Tofori 123a 55010, Camigliano-S.Gemma Lucca
Italy


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to