<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.2491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi Aileen,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>For that you can use the layerReorder or Mapoverlay
plugin. They allow user to reorder layers, change layers style and class
and so on.</FONT></DIV>
<DIV><FONT size=2>Depending of your needs you may have to extend that
plugin.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>See <A
href="http://www.cartoweb.org/demos/demoPlugins.php">http://www.cartoweb.org/demos/demoPlugins.php</A> "Layers
reorder" tab for an exemple of usage.</FONT></DIV>
<DIV><FONT size=2>The plugin are in the main /plugin/ folder in
cartoweb</FONT></DIV>
<DIV><FONT size=2>See <A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.mapoverlay.html">http://www.cartoweb.org/doc_head/docbook/xhtml/dev.mapoverlay.html</A> and
<A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.layers.html#user.layers.layer_reorder">http://www.cartoweb.org/doc_head/docbook/xhtml/user.layers.html#user.layers.layer_reorder</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=aileen@mapcentral.ph href="mailto:aileen@mapcentral.ph">Aileen
Baylon</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=oliver.christen@camptocamp.com
href="mailto:oliver.christen@camptocamp.com">oliver</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, May 12, 2006 8:21 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] passing a
variable from php to map file</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi oliver!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks for your immediate reply. I was hoping
more of a dynamic approach.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Like a user will choose from a drop-down
menu and the map will dynamically refesh getting the parameter from the PHP
file to the map file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Have you done this already?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Aileen</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=oliver.christen@camptocamp.com
href="mailto:oliver.christen@camptocamp.com">oliver</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
; <A title=aileen@mapcentral.ph href="mailto:aileen@mapcentral.ph">Aileen
Baylon</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=len@mapcentral.ph
href="mailto:len@mapcentral.ph">'len'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, May 12, 2006 2:08
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] passing a
variable from php to map file</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hi Aileen</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>a configuration file is a simple text file containing the
variable assignation, like this:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>CARTOCLIENT_BASE_URL = "<A
href="http://your/path/to/cartoweb/htdocs/">http://your/path/to/cartoweb/htdocs/</A>"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>SHAPEPATH = "/bla/bla/bla/bla"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>DB_USER = xxxx<BR>DB_PASSWD =
yyyy<BR>DB_HOST = localhost<BR>DB_PORT =
1234<BR>DB_NAME = test<BR></FONT></DIV>
<DIV><FONT size=2>then just point on this file when launching the
setup script:</FONT></DIV>
<DIV><FONT size=2>cw3setup.php --install --config-from-file
/some/path/to/the/config/file/config_file</FONT></DIV>
<DIV><FONT size=2>the setup script will look for all files whose extension
is .ini.in and replace the variable accordingly to what you seted in the
configuration file.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards,</FONT></DIV>
<DIV><FONT size=2>Oliver</DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT size=2></FONT><FONT size=2></FONT><BR></DIV>
<DIV><FONT face=Arial size=2>hi oliver.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm sorry but i'm failrly new to
this.</FONT></DIV>
<DIV><FONT face=Arial size=2>How do you set a configuration file
containing the variable replacement values?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would appreciate any help.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aileen</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT size=2></FONT><BR></DIV>
<DIV><FONT size=2>Hi Aileen,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>by 'passing a variable from php to a map file' you
mean writing some parameters to the mapfile before usage (like database
connetions parameters) or modifying the mapfile object on the fly
to imediat usage?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>To write parameters you can use the install script
function, change your mapfile extension to .map.in and add the
variables replacement tags @YOUR_VARIABLE@ where they are needed. After
that set a configuration file containing the variable replacement
values. Then you just need to do a cw3setup.php --install
--config-from-file path_to_and_name_of_the_config_file</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>If you need to modify the mapfile object on the fly,
you can have a look at the plugin Outline, in ServerOutline.php
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>$msMapObj = $this->serverContext->getMapObj();
this will get you the map object</FONT></DIV>
<DIV><FONT size=2>then its just a question of using phpmapscript
functions and properties: <A
href="http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/referencemanual-all-pages">http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/referencemanual-all-pages</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>there are some exemple of usage in ServerOutline.php
to access, create, modify and remove elements (layers, style,
class, ... )</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT size=2></FONT><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>We are having trouble passing a variable
from php to a map file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>How do you declare this in
php?</FONT></DIV>
<DIV><FONT face=Arial size=2>How do you catch this in the map
file?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>We want to pass the "source_id" &
"target_id" to the mapfile?</FONT></DIV>
<DIV><FONT face=Arial size=2>we are still on the R&D stage and we
are trying to customize the demoPlugin but with our data?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help will be much
appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Aileen</FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE>
<P>
<HR>
<P></P>No virus found in this incoming message.<BR>Checked by AVG Free
Edition.<BR>Version: 7.1.392 / Virus Database: 268.5.6/337 - Release
Date: 5/11/2006<BR></BLOCKQUOTE></BLOCKQUOTE>
<P>
<HR>
<P></P>No virus found in this incoming message.<BR>Checked by AVG Free
Edition.<BR>Version: 7.1.392 / Virus Database: 268.5.6/337 - Release Date:
5/11/2006<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>