[Cartoweb-users] Showing data on the map and zoom tool

Oliver Christen oliver.christen at camptocamp.com
Fri Oct 13 08:28:27 EDT 2006


try something like
DATA "the_geom from (SELECT the_geom, province_id, name, col2, col3, colXXX 
from mz_prov) AS foo using unique province_id using SRID=-1"

and add

  METADATA
    "id_attribute_string" "province_id"
  END

supposing your province has a unique id named province_id, replace as needed 
(same for the colx parameters, these are just exemples)
dont forget to specify the SRID if you use a specific projection

concerning your zoom problem, check that you dont have any javascript 
errors.

> Hi all...
>
> *I built already my application, but I'm some problems on getting data 
> from
> my PostgreSQL database to show them on the map.
>
> I have the following code in the .map file:
>
>  LAYER
>    NAME "province"
> CONNECTION "user=heddy password=123456 host=localhost dbname=recursos"
> CONNECTIONTYPE POSTGIS
>   DATA "the_geom from mz_prov"
> LABELITEM "name"
> TYPE POLYGON
>    TRANSPARENCY 70
>    CLASS
>      STYLE
>        COLOR 167 246 165
> OUTLINECOLOR 0 0 0
> SYMBOL 0
>      END
>      LABEL
>    MINFEATURESIZE 20
>      END
>    END
>  END
>
>
> With this code I can see the Province's name...Now I'm trying to get some
> diferent data from the same database (from diferent tables), but the 
> result
> doesn't come out...
> Is there any file missing? What files do I need in the DATA folder
> (C:\wamp\www\cartoweb3\projects\moz\server_conf\moz\data)?
>
> * The second problem is that my Zoom in/Zoom out tool is not working???
>
> Any help, I would appreciate...
>
>
> Hélder M.C. Muianga
> Cell: 82-47 27 160
> Formado em Sistemas de Informação
> E-mail alternativo:hmuianga at yahoo.com
>
> "LUTE PELAS TUAS CONVICÇÕES, MESMO QUE ISSO TE CUSTE UMA LÁGRIMA"
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list