[Chameleon] expressionbuilder with chameleon 1.99

Paul Spencer pspencer at dmsolutions.ca
Wed Nov 17 16:56:03 EST 2004


Sandra:

ExpressionBuilder can be used in one of two ways:

with SelectLayers widget ... this is a hidden widget that is intended to 
be used with an appropriate html legend template widget, see the sample 
applications that have radio buttons next to the checkboxes in the legend.

The other way is to manually set metadata in the layer "selected" "1"

Cheers,

Paul

Rodriguez Sandra wrote:
> Please help me!
> 
> Where are this mistakes in this files because, the program show me this message:There is no active layer selected. You must select a layer inorder to use this tool.
> 
> thanks for help me.
> 
> Sandra
> 
> These are my files:
> 
> MAPFILE:
> 
> #
> # Start of map file
> #
> # Sample map file for a chameleon app.
> #
> NAME ECUADOR
> STATUS ON
> SIZE 500 400
> #SYMBOLSET ../etc/symbols.sym
> EXTENT 484352.06 9439281.94 1167048.17 10171018.60
> UNITS KILOMETERS
> SHAPEPATH "../data"
> IMAGECOLOR 255 255 255
> FONTSET ../etc/fonts.list
> 
> 
> #
> # Start of web interface definition
> #
> WEB
>   MINSCALE 2000000
>   MAXSCALE 50000000
> #
> # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root 
> # of the drive where the .MAP file resides.
> #
>   IMAGEPATH "c:\ms4w\tmp\ms_tmp\" 
>   IMAGEURL "/ms_tmp/"
> #  LOG "/tmp/gmap.log"
>    METADATA
>         "wms_title" "Div. Pol. WMS"
>         "wms_abstract" "Ecuador Continental "
>         #"wms_accessconstraints" "none"
>         "wms_srs" "EPSG:4248"
>        
>         "wfs_title" "Div. Pol. WFS"
>         "wms_onlineresource" "http://rodriguess/scripts/mapserv.exe?map=C:\ms4w\apps\chameleon\sispg_mapas\map\sispg_sicend_ec_prov.map&"
>         "wfs_onlineresource" "http://rodriguess/scripts/mapserv.exe?map=C:\ms4w\apps\chameleon\sispg_mapas\map\sispg_sicend_ec_prov.map&"
>         "wfs_srs" "EPSG:4248"        
>     END
> 	#TEMPLATE "sispg.html"
> END
> 
> #
> # Start of reference map
> #
> REFERENCE
>    IMAGE images/ecuador.jpg
>    EXTENT 484352.06 9439281.94 1167048.17 10171018.60
>    STATUS ON
>    COLOR -1 -1 -1
>    OUTLINECOLOR 255 0 0
>    SIZE 120 90      
> END
> 
> #
> # Start of legend
> #
> LEGEND
>   KEYSIZE 12 6
>   LABEL
>     TYPE BITMAP
>     SIZE SMALL
>     COLOR 0 0 89
>   END
>   STATUS ON
> END
> 
> #
> # Start of scalebar
> #
> SCALEBAR
>   IMAGECOLOR 255 255 255
>   LABEL
>     COLOR 0 0 0 
>     SIZE SMALL
>   END
>   SIZE 150 5
>   COLOR 255 255 255
>   BACKGROUNDCOLOR 0 0 0
>   OUTLINECOLOR 0 0 0
>   UNITS kilometers
>   INTERVALS 5
>   STATUS ON
> END
> 
> 
> QUERYMAP
>   STYLE HILITE
>   COLOR 255 0 0
> END
> 
> PROJECTION
>     "init=epsg:4248"
> END
> 
> #
> # Start of layer definitions
> #
> 
> 
> LAYER
>   NAME PROVINCIAL
>   PROJECTION
>     "init=epsg:4248"
>   END
> 
>   CONNECTION "http://rodriguess/scripts/mapserv.exe?map=C:\ms4w\apps\chameleon\sispg_mapas\map\sispg_sicend_ec_prov.map&"
>   CONNECTIONTYPE WMS
>   
>   METADATA
>     "wms_srs" "EPSG:4248"
>     "wms_onlineresource" "http://rodriguess/scripts/mapserv.exe?map=C:\ms4w\apps\chameleon\sispg_mapas\map\sispg_sicend_ec_prov.map&"
>     "wms_name" "PROVINCIAL"
>     "wms_title" "Ecuador Continental - Div. Pol. Prov."
>     "wms_style_default_title" ""
>     "wms_style_default_legendurl" "0 0  "
>     "wms_server_version" "1.1.0"
>     "wms_formatlist" "image/jpeg,image/png"
>     "wms_format" "image/png"
>     "wms_boundingbox" "EPSG:4248"
>     "wms_style" ""
>     "selected" "0"
>     "wms_latlonboundingbox" "484352.06 9439281.94 1167048.17 10171018.60"
>     
>   END
>   TYPE POLYGON
>   STATUS ON
>   #DATA PROVINCIAL
>   CLASSITEM "CAN_PROV"
>   LABELITEM "CAN_PROV"
> 
> SIZEUNITS PIXELS
> DUMP TRUE
> TOLERANCE 0
> TOLERANCEUNITS PIXELS	
> UNITS KILOMETERS
>  TEMPLATE "ttt_query.html"
>  
>   CLASS
> 	EXPRESSION "PICHINCHA"
>     NAME "Provincias"
>     COLOR 190 255 225
>     OUTLINECOLOR 0 0 0
>     TEMPLATE "ttt_query.html"
>     LABEL
> 		COLOR 0 0 0
> 		TYPE TRUETYPE
> 		FONT arial-bold
> 		SIZE 7
> 		ANTIALIAS TRUE
> 		POSITION CC
> 		PARTIALS TRUE
> 		MINDISTANCE 20
> 		BUFFER 20
> 	END
>  END 
>  
>  END
> END
> 
> IN MY HTML FILE:
> 
> 	<cwc2 type="ExpressionBuilder" visible="true" styleresource="TextButtons" label="Construir Filtro" 	image="icons/icon_expression_build.png" imagetip="Construir Filtro" popupwidth="700" popupheight="500" toolbar="false" 	status="false" menubar="false" wildcard="@" singlechar="." escape="!"> 
>             <image state="normal"/>
>             <image state="selected"/>
>             <image state="hover"/>
>           </cwc2>
> 
> 
> 
> 
> -----Mensaje original-----
> De: bartvde at xs4all.nl [mailto:bartvde at xs4all.nl]
> Enviado el: Miércoles, 17 de Noviembre de 2004 11:29
> Para: Rodriguez Sandra
> CC: chameleon at lists.maptools.org
> Asunto: Re: [Chameleon] expressionbuilder with chameleon 1.99
> 
> 
> Hi,
> 
> you need to setup your LAYER in the MAP file with both a WMS and a WFS
> interface (the WFS interface is used through a DescribeLayer request on
> the WMS), e.g.:
> 
> WMS server map file:
> 
>   WEB
>     METADATA
>       WMS_TITLE "Gemeentes mapserver WMS"
>       WMS_ABSTRACT "UMN MapServer Gemeentekaart"
>       WMS_ACCESSCONSTRAINTS none
>       WMS_SRS "EPSG:28992"
>       WFS_TITLE "Gemeentes mapserver WFS"
>       WMS_ONLINERESOURCE
> "http://myserver/cgi-bin/mapserv.exe?map=/ms4w/apps/general/map/gemeentes.map&"
>       WFS_ONLINERESOURCE
> "http://myserver/cgi-bin/mapserv.exe?map=/ms4w/apps/general/map/gemeentes.map&"
>       WFS_SRS "EPSG:28992"
>     END
>   END
> 
> 
> ..
> 
> And then on your LAYER:
>         METADATA
>           WMS_TITLE "Gemeentes"
>           WMS_ABSTRACT "Gemeentes via UMN Mapserver"
>           WMS_SRS "EPSG:28992"
>           WFS_TITLE "Gemeentes"
>         END
> 
> Chameleon app MAP file:
> 
> In your Chameleon application MAP file you can use a CONNECTIONTYPE WMS
> layer:
> 
>   LAYER
>       CONNECTION
> "http://geoservice1-agi.minvenw.nl/cgi-bin/mapserv.exe?map=/ms4w/apps/general/map/gemeentes.map&"
>       CONNECTIONTYPE WMS
>         METADATA
>           "wms_srs" "EPSG:28992 EPSG:4326"
>           "wms_onlineresource" 
> "http://myserver/cgi-bin/mapserv.exe?map=/ms4w/apps/general/map/gemeentes.map&"
>           "wms_name"  "Gemeentes"
>           "wms_title" "Gemeentes"
>           "wms_style_default_title" ""
>           "wms_style_default_legendurl" "0 0  "
>           "wms_server_version"  "1.1.0"
>           "wms_formatlist"  "image/jpeg,image/png"
>           "wms_format"  "image/png"
>           "wms_boundingbox" "EPSG:28992 0 288007.5 288009 624000"
>           "wms_style" ""
>           "wms_latlonboundingbox" "2.68506 49.54247 7.75847 54.61588"
>         END
>       NAME "Gemeentes"
>       PROJECTION
>         "init=epsg:28992"
>       END
>       SIZEUNITS PIXELS
>       STATUS ON
>       DUMP TRUE
>       TEMPLATE "blank.html"
>       TOLERANCE 0
>       TOLERANCEUNITS PIXELS
>       TYPE RASTER
>       UNITS METERS
>   END
> 
> You can use the following in your Chameleon HTML template:
> 
> <cwc2 type="ExpressionBuilder" visible="true" styleresource="NavButton"
> image="skins/flat_grey/icon_expression_build.png" imagetip="Querybuilder =
> Selectie via expressie" imagewidth="24" imageheight="24" popupwidth="800"
> popupheight="450" toolbar="false" status="false" menubar="false"
> wildcard="@" singlechar="." escape="!">
>     <image state="normal"/>
>     <image state="hover"/>
> </cwc2>
> 
> Hope this helps.
> 
> Best regards,
> Bart
> 
> 
>>I need to use expressionbuilder with chameleon 1.99. Please I need a
>>sample.
>>I have PHP 4.3.7, MAPSERVER 4, PHPMAPSCRIPT 4.2,CHAMEMELEON 1.99, WINDOWS
>>2000.
>>Can anyone please help me?
>>Thanks
>>Sandra
>>
>>
>>
>>
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
>>
> 
> 
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
Cheers,

Paul

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the Chameleon mailing list