[Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, Issue 26

veroh at bluewin.ch veroh at bluewin.ch
Wed Apr 18 15:06:18 EDT 2007


Well, I also used the help from the documentation available but 
beware that

1) You don't have to put <div id=search_result_div> as it said, but 
<div id=search_result>. If you don't do that it work fine but keep on 
apparently weorking and no result is shown.

2) For the recentering thingy, did you try it ? Because if you put 
the value = 1 as it is said in the documentation, no way you can zoom 
on your row ! It have to be 0 and you don't have to forgot to had the 
layer in the location.ini.in in the list of layer on which you do 
recenter. If I didn't do both then no way I can zoom.

But again, it is now working fine for me after those modifications 
so if ever it appeared that they are "universal" and not dependent on 
my system (windows) than maybe updating the documentation would ne 
great !

Now I am quite happy, doing clause where something is higher than 
something else (well my boss is quite pleased as it was what he 
wanted) but... now it would like that all the rows that result from 
the search plugin are automatically put in another color on the map ! 
I don't know if I am not trying to convince him to drop that idea, 
but if anyone got any idea....

Well time to get back to real life !

Véronique


----Message d'origine----
De: cartoweb-users-request at lists.maptools.org
Date: 18.04.2007 15:06
À: <cartoweb-users at lists.maptools.org>
Objet: Cartoweb-users Digest, Vol 24, Issue 26

Send Cartoweb-users mailing list submissions to
	cartoweb-users at lists.maptools.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.maptools.org/mailman/listinfo/cartoweb-users
or, via email, send a message with subject or body 'help' to
	cartoweb-users-request at lists.maptools.org

You can reach the person managing the list at
	cartoweb-users-owner at lists.maptools.org

When replying, please edit your Subject line so it is more 
specific
than "Re: Contents of Cartoweb-users digest..."


Today's Topics:

   1. Re: Plugin search not working (wochter)
   2. Re: RE: Cartoweb-users Digest, Vol 24, Issue 22 (Oliver 
Christen)
   3. Re: RE: Cartoweb-users Digest, Vol 24, Issue 22
      (V?ro Herzl - Bluewin)
   4. Re: Problem ini file parsing and question	aboutswitches
      (Dirk Jesko)
   5. Re: Problem ini file parsing and question	aboutswitches
      (Oliver Christen)



----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Apr 2007 11:03:38 +0200
From: wochter <wochter at seznam.cz>
Subject: Re: [Cartoweb-users] Plugin search not working
To: cartoweb-users at lists.maptools.org
Message-ID: <4625DEEA.1070806 at seznam.cz>
Content-Type: text/plain; charset=UTF-8

Hi,
have you right edited YourProject/plugins/search/templates/*.tpl 
files?
and /plugins/search/htdocs/js/Search.ajax.js too ?

This plugin works fine for me.
I used help from here:
http://www.cartoweb.org/doc_head/docbook/xhtml/user.search.html

wochter

veroh at bluewin.ch  wrote / napísal(a):
> Hello,
> 
> So basically, if I introduce the value POSTGIS_MAJ, I do get a 
bit 
> further on... I got a failure which say that it can not connect 
to 
> the dsn or db.
> 
> I decided then to try to follow the chapter 24 which says that 
no 
> file should be under the serverside ini file but on the client 
side. 
> This is not what I did the first time as I followed the advices 
you 
> gave in March to another contributor.
> 
> So I got now
> 
> dbType = pgsql
> dsn = pgsql://postgres:afgan6@localhost:5432/demo_n16 in my 
search.
> ini on the client side and on the server side (same search.ini 
> files).
> 
> Here is the message of the failure
> 
> Failure
> 
> CartoWeb version: 3.3.0 [$Revision: 1.2 $]
> class:   CartocommonException
> message:   Error [8, Undefined index:  , C:
> \wamp\www\cartoweb3\common\Encoding.php, 79]
> Backtrace:
> 
> file: 79 - C:\wamp\www\cartoweb3\common\Encoding.php
> call: Common::cartowebErrorHandler(8, "Undefined index:  ", "C:
> \wamp\www\cartoweb3\common\Encoding.php", 79, Array(1))
> 
> file: 117 - C:\wamp\www\cartoweb3\common\Encoding.php
> call: Encoder::getEncoder(Null)
> 
> file: 272 - C:\wamp\www\cartoweb3\plugins\search\common\Search.
php
> call: Encoder::decode("", Null)
> 
> file: 269 - C:
> \wamp\www\cartoweb3\plugins\search\client\ClientSearch.php
> call: DbResultProvider->getResult(Object(SearchRequest))
> 
> file: 265 - C:\wamp\www\cartoweb3\client\ClientPluginHelper.php
> call: ClientSearch->initializeResult(Null)
> 
> file: UNKNOWN - UNKNOWN
> call: ServerCallerHelper->initializeResultHelper(Object
> (ClientSearch), Object(MapResult))
> 
> file: 267 - C:\wamp\www\cartoweb3\common\PluginManager.php
> call: call_user_func_array(Array(2), Array(2))
> 
> file: 320 - C:\wamp\www\cartoweb3\common\PluginManager.php
> call: PluginManager->callPluginImplementing(Object
(ClientSearch), 
> "ServerCaller", "initializeResult", Array(1))
> 
> file: 685 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: PluginManager->callEnabledPluginsImplementing(2, 
> "ServerCaller", "initializeResult", Array(1))
> 
> file: 1057 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: Cartoclient->callEnabledPluginsImplementing(2, 
> "ServerCaller", "initializeResult", Object(MapResult))
> 
> file: 1220 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: Cartoclient->doMain()
> 
> file: 38 - C:\wamp\www\cartoweb3\htdocs\client.php
> call: Cartoclient->main()
> 
> file: 3 - C:\wamp\www\cartoweb3\htdocs\n16.php
> call: require_once("C:\wamp\www\cartoweb3\htdocs\client.php")
> 
> 
> Is it a step backward or forward ???
> 
> Véronique
> 
> ----Message d'origine----
> De: oliver.christen at camptocamp.com
> Date: 17.04.2007 15:07
> À: "Véro Herzl - Bluewin"<veroh at bluewin.ch>, <cartoweb-
users at lists.
> maptools.org>
> Objet: Re: [Cartoweb-users] Plugin search not working
> 
> i think POSTGIS_MAJ
> Well yes, you got it right, it is empty. So to fill it, what do 
I 
> have to put in ?
> 
> Véronique
> 
> 
> Oliver Christen a écrit: I forgot to say the most important:be 
sure 
> the value of that input is not emptyregardsOliverHithere are no 
> search_config parameter set in the post request. I think the 
main 
> search input name must be search_configdo you have a <input 
type="
> hidden" id="search_config" name="search_config" element in your 
> search template ?regardsOliver----- Original Message ----- From: 
Véro 
> Herzl - Bluewin 'mailto:veroh at bluewin.ch'To: Damien Corpataux 
'mailto:
> damien.corpataux at camptocamp.com' ; cartoweb-users at lists.maptools.
org 
> 'mailto:cartoweb-users at lists.maptools.org' Sent: Tuesday, April 
17, 
> 2007 2:21 PMSubject: Re: [Cartoweb-users] Plugin search not 
working
> OK, well, I am in the development mode but with Ajax on and 
> cartoclient.Ajaxheader,tpl, so the error message is for the 
Ajay 
> part
> 
> 
> --- Action Search.DoIt triggered ---
> Calling Search.DoIt onBeforeAjaxCall()
> Calling AjaxPlugins.Common.onBeforeAjaxCall()
> Initiating AJAX request
> Pending actions: 1
> GET params:
> ajaxActionRequest=Search.DoIt&
> POST params:
> 
> 
posted=1&js_folder_idx=5&js_toolbar_idx=&selection_type=&selection_coords=&features=&js_accounting=version=0;
> hasJava=true;winInnerWidth=1024;winInnerHeight=578;
> screenWidth=1024;
> screenHeight=768;screenColorDepth=32&outline_label_text=votre
> 
> 
titre&tool=zoomin&project=n16&recenter_x=&recenter_y=&recenter_doit=0&shortcut_doit=0&openNodes=&layers
> []=OPA&layers[]=OPB&layers[]=OPC&layers[]=OPD&layers[]
=OPE&layers
> []
> =OPF&layers[]=OPG&layers[]=OPH&layers[]=N16&layers[]
> =POSTGIS_MAJ&layers[]=EDITPOINT&layers[]=EDITPOLY&layers[]
> 
> 
=EDITLINE&pdfMarginX=20&pdfMarginY=20&pdfA4x=210&pdfA4y=297&pdfA3x=297&pdfA3y=420&pdfOrientation=portrait&pdfMapAngle=&pdfMapCenterX=&pdfMapCenterY=&pdfTitle=&pdfNote=&pdfScalebar=&pdfLegend=0&viewTitle=&author=&handleView=0&locate_MAJ=&locate_MAJ2=&id_recenter_ids=&search_mandat_n16=N2354&search_travaux=&search_date_txt=&search_en_cours=&search_config=&search_sort_column=&search_sort_direction=asc&search_number=&outline_mask=no&outline_point_symbol=circle&outline_point_size=10&outline_line_size=3&outline_line_transparency=100&outline_polygon_transparency=60&edit_validate_all=0&recenter_scale=0&shortcut_id=-
> 
> 
1&mapsize=1&pdfFormat=A4&pdfResolution=96&pdfScale=2500&id_recenter_layer=MAJ&edit_layer=0&
> Waiting for response...
> Response received!
> Error: AjaxHandler.actionRequest(): received response is
> malformed!
> And below it, I got the following failure :
> Failure
> 
> CartoWeb version: 3.3.0 [$Revision: 1.2 $]
> class: CartoclientException
> message: Empty config or config not found
> Backtrace:
> 
> file: UNKNOWN - UNKNOWN
> call: ClientSearch->handleHttpPostRequest(Array(62))
> 
> file: 270 - C:\wamp\www\cartoweb3\common\PluginManager.php
> call: call_user_func_array(Array(2), Array(1))
> 
> file: 320 - C:\wamp\www\cartoweb3\common\PluginManager.php
> call: PluginManager->callPluginImplementing(Object
(ClientSearch), 
> "GuiProvider", "handleHttpPostRequest", Array(1))
> 
> file: 685 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: PluginManager->callEnabledPluginsImplementing(1, 
> "GuiProvider", "handleHttpPostRequest", Array(1))
> 
> file: 995 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: Cartoclient->callEnabledPluginsImplementing(1, 
"GuiProvider", 
> "handleHttpPostRequest", Array(62))
> 
> file: 1220 - C:\wamp\www\cartoweb3\client\Cartoclient.php
> call: Cartoclient->doMain()
> 
> file: 38 - C:\wamp\www\cartoweb3\htdocs\client.php
> call: Cartoclient->main()
> 
> file: 3 - C:\wamp\www\cartoweb3\htdocs\n16.php
> call: require_once("C:\wamp\www\cartoweb3\htdocs\client.php")
> 
> 
> 
> 
> 
> Damien Corpataux a écrit: Hello,
> 
> if you are in development mode, when an error occurs, an alert 
box 
> is displayed and allows you to print the cartoweb error message. 
Can 
> you post this error message?
> 
> Regards,
> Damien
> 
> 
> veroh at bluewin.ch 'mailto:veroh at bluewin.ch' wrote: 
> Hello,
> I am trying to implement the plugin search in my project but I 
got
> the following error
> --- Action Search.DoIt triggered ---
> Calling Search.DoIt onBeforeAjaxCall()
> Calling AjaxPlugins.Common.onBeforeAjaxCall()
> Initiating AJAX request
> Pending actions: 1
> GET params:
> ajaxActionRequest=Search.DoIt&
> POST params:
> 
> 
posted=1&js_folder_idx=5&js_toolbar_idx=&selection_type=&selection_coords=&features=&js_accounting=version=0;
> hasJava=true;winInnerWidth=1024;winInnerHeight=578;
> screenWidth=1024;
> screenHeight=768;screenColorDepth=32&outline_label_text=votre
> 
> 
titre&tool=zoomin&project=n16&recenter_x=&recenter_y=&recenter_doit=0&shortcut_doit=0&openNodes=&layers
> []=OPA&layers[]=OPB&layers[]=OPC&layers[]=OPD&layers[]
=OPE&layers
> []
> =OPF&layers[]=OPG&layers[]=OPH&layers[]=N16&layers[]
> =POSTGIS_MAJ&layers[]=EDITPOINT&layers[]=EDITPOLY&layers[]
> 
> 
=EDITLINE&pdfMarginX=20&pdfMarginY=20&pdfA4x=210&pdfA4y=297&pdfA3x=297&pdfA3y=420&pdfOrientation=portrait&pdfMapAngle=&pdfMapCenterX=&pdfMapCenterY=&pdfTitle=&pdfNote=&pdfScalebar=&pdfLegend=0&viewTitle=&author=&handleView=0&locate_MAJ=&locate_MAJ2=&id_recenter_ids=&search_mandat_n16=N2354&search_travaux=&search_date_txt=&search_en_cours=&search_config=&search_sort_column=&search_sort_direction=asc&search_number=&outline_mask=no&outline_point_symbol=circle&outline_point_size=10&outline_line_size=3&outline_line_transparency=100&outline_polygon_transparency=60&edit_validate_all=0&recenter_scale=0&shortcut_id=-
> 
> 
1&mapsize=1&pdfFormat=A4&pdfResolution=96&pdfScale=2500&id_recenter_layer=MAJ&edit_layer=0&
> Waiting for response...
> Response received!
> Error: AjaxHandler.actionRequest(): received response is
> malformed!
> I have a search.ini file in my client_conf :
> config.POSTGIS_MAJ.provider.type = fulltextTable
> config.POSTGIS_MAJ.provider.table = maj2
> config.POSTGIS_MAJ.provider.id = gid
> config.POSTGIS_MAJ.provider.columns = mandat_n16, travaux,
> date_txt, en_cours
> config.POSTGIS_MAJ.provider.fulltextColumns = mandat_n16, 
travaux,
> date_txt, en_cours
> config.POSTGIS_MAJ.provider.sortColumn = date_txt
> config.POSTGIS_MAJ.provider.sortDirection = asc
> config.POSTGIS_MAJ.provider.sortPriorities = date_txt, 
mandat_n16,
> travaux, en_cours
> config.POSTGIS_MAJ.provider.labels = mandat_n16, travaux, 
> date_txt,
> en_cours
> config.POSTGIS_MAJ.formatter.type = smarty
> config.POSTGIS_MAJ.formatter.template = search_results
> Where POSTGIS is the layer I declared in my MAP file which is a
> POSTGRESQL/POSTGIS table (maj2) and gid is the 
> 'id_attribute_string'
> I have also one in the server_side :
> dbType = pgsql
> dsn = pgsql://postgres:afgan6@localhost:5432/demo_n16
> config.POSTGIS_MAJ.provider.type = fulltextTable
> config.POSTGIS_MAJ.provider.table = maj2
> config.POSTGIS_MAJ.provider.id = gid
> config.POSTGIS_MAJ.provider.columns = mandat_n16, travaux,
> date_txt, en_cours
> config.POSTGIS_MAJ.provider.fulltextColumns = mandat_n16, 
travaux,
> date_txt, en_cours
> config.POSTGIS_MAJ.provider.sortColumn = date_txt
> config.POSTGIS_MAJ.provider.sortDirection = asc
> config.POSTGIS_MAJ.provider.sortPriorities = date_txt, 
mandat_n16,
> travaux, en_cours
> config.POSTGIS_MAJ.provider.labels = mandat_n16, travaux, 
> date_txt,
> en_cours
> config.POSTGIS_MAJ.formatter.type = smarty
> config.POSTGIS_MAJ.formatter.template = search_results
> I modified my cartoclient.tpl by adding two lines
> {if $search_active|default:''}<script type="text/javascript" 
src="
> {r type=js plugin=search}Search.ajax.js{/r}"></script>{/if}
> which is just after the one for the Ajax ({if 
$ajaxOn|default:''}
> etc..)
> and in the div="container", I added in one of my div=folder :
> {if $search_active|default:''} {$search} {/if}
> I got in templates, two files :
> search.tpl:
> <div id="search_div">
> <fieldset>
> <legend>{t}Search{/t}
> </legend>
> <br/>
> <table width="100%">
> <tr>
> <td>
> {t}Mandat: {/t}
> </td>
> <td>
> <input type="text" id="search_mandat_n16" name="
> search_mandat_n16" size="13"/>
> </td>
> </tr>
> <tr>
> <td>
> {t}Type de travaux: {/t}
> </td>
> <td>
> <input type="text" id="search_travaux" name="search_travaux" 
> size="13"/>
> </td>
> </tr>
> <tr>
> <td>
> {t}Date: {/t}
> </td>
> <td>
> <input type="text" id="search_date_txt" name="search_date_txt" 
> size="13"/>
> </td>
> </tr>			
> <tr>
> <td>
> {t}En cours ou non: {/t}
> </td>
> <td>
> <input type="text" id="search_en_cours" name="search_en_cours" 
> size="13"/>
> </td>
> </tr>
> </table>
> <p>
> <input type="submit" value="{t}Search{/t}" class="form_button" 
> onclick="Javascript: CartoWeb.trigger('Search.DoIt'); return 
> false;"
> />
> <input type="hidden" id="search_config" name="search_config" />
> <input type="hidden" id="search_sort_column" name="
> search_sort_column" />
> <input type="hidden" id="search_sort_direction" name="
> search_sort_direction" value="asc" />
> <input type="hidden" id="search_number" name="search_number" />
> <div id="search_results_div">
> </div>
> </p>
> </fieldset>
> </div>
> and search_results.tpl
> {if $table->numRows > 0}
> <table class="n16table">
> <tr>
> <th>
> {t}Id{/t}
> </th>
> {foreach from=$table->columnIds item=column}
> <th>
> <a href="Javascript: order('{$column}');">{t}{$column}{/t}
> </a>
> </th>
> {/foreach}
> </tr>
> {foreach from=$table->rows item=row}
> <tr>
> {foreach from=$row->cells item=value}
> <td>
> <a href="Javascript: recenter('{$row->rowId}');">{$value}</a>
> </td>
> {/foreach}
> </tr>
> {/foreach}
> </table>
> {else}
> {t}No results{/t}
> {/if}
> Last but not least, I got the js ! Namely Search.ajax.js
> AjaxPlugins.Search = {
> handleResponse: function(pluginOutput) {
> if (pluginOutput.htmlCode.POSTGIS_MAJ)
> $('search_results').innerHTML = pluginOutput.htmlCode.
> POSTGIS_MAJ;
> }
> };
> /*
> * Search plugin's Actions
> */
> AjaxPlugins.Search.Actions = {};
> AjaxPlugins.Search.Actions.DoIt = {
> buildPostRequest: function(argObject) {
> return AjaxHandler.buildPostRequest();
> }
> };
> function order(column) {
> if (column != $('search_sort_column').value){
> $('search_sort_column').value = column;
> $('search_sort_direction').value = 'asc';
> } else {
> if ($('search_sort_direction').value == 'asc') {
> $('search_sort_direction').value = 'desc';
> } else {
> $('search_sort_direction').value = 'asc';
> }
> }
> CartoWeb.trigger('Search.DoIt');
> }
> function recenter(id) {
> if ($('search_config').value == 'POSTGIS_MAJ') {
> $('id_recenter_ids').value = gid; //id to recenter
> $('recenter_scale').value = 1000; //scale for recentering
> $('recenter_doit').value = '1';
> CartoWeb.trigger('Location.Recenter');
> }
> I guess you now know all I did. Could someone please tell me 
what
> is wrong.
> Apparently, someone else asked the same thing last month but no
> final answer was given on the mail list.
> PS : Yes, I did clean all the file before trying
> Véronique
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org 'mailto:Cartoweb-users at lists.
> maptools.org'http://lists.maptools.
org/mailman/listinfo/cartoweb-
> users 'http://lists.maptools.org/mailman/listinfo/cartoweb-
users'
> 




------------------------------

Message: 2
Date: Wed, 18 Apr 2007 11:47:52 +0200
From: "Oliver Christen" <oliver.christen at camptocamp.com>
Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, 
Issue
	22
To: <veroh at bluewin.ch>
Cc: cartoweb-users at lists.maptools.org
Message-ID: <1b6f01c7819e$a6efd5a0$15e3a8c0 at maunakea>
Content-Type: text/plain; format=flowed; charset="UTF-8";
	reply-type=original

the response seems correctly formated

I noticed something else.
in your search.ajax.js , change :
$('search_results').innerHTML = pluginOutput.htmlCode.POSTGIS_MAJ;
by
$('search_results_div').innerHTML = pluginOutput.htmlCode.
POSTGIS_MAJ;

and let me know if it works

if it's ok, then it's an error in the documentation

regards
Oliver


----- Original Message ----- 
From: <veroh at bluewin.ch>
To: <oliver.christen at camptocamp.com>
Sent: Wednesday, April 18, 2007 11:03 AM
Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, 
Issue 22


So here we go. I only send th emessage to you as there is a limit 
for
the cartoweb list.

Véronique


----Message d'origine----
De: oliver.christen at camptocamp.com
Date: 18.04.2007 10:38
À: <veroh at bluewin.ch>
Copie: <cartoweb-users at lists.maptools.org>
Objet: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24,
Issue 22

at first sight it looks ok, but we only see the beginning and the
rest is
cut because of the alert box.
so we will have to change a bit the debugging.

do you have the FireFox web developer addon ? if no, install it
now:
https://addons.mozilla.org/en-US/firefox/addon/60

then in AjaxHandler.js
remove alert(response.responseText);
and write:
xGetElementById('debugbox').innerHTML = '<pre>' + response.
responseText +
'</pre>';

and in your cartoclient.tpl, add near the footer:
<div id="debugbox"></div>

make a cw3setup.php --clean so the template change is taken into
account

try again the search, then, using the web developer toolbar, 
choose
the View
Source->View Generated Source and have a look at the content of 
the
<div
id="debugbox"> element. Now we should see the complet response
message.

copy it and sent it to me

regards
Oliver

----- Original Message ----- 
From: <veroh at bluewin.ch>
To: <oliver.christen at camptocamp.com>
Cc: <cartoweb-users at lists.maptools.org>
Sent: Wednesday, April 18, 2007 10:24 AM
Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24,
Issue 22


OK, so after clearing the cache and restarting Apache (wamp), I 
got
a
message. Unfortunately, no ways that I could copy it so I did a
printscreen and it is in the joined file.

Hope it will help.

Véronique















------------------------------

Message: 3
Date: Wed, 18 Apr 2007 13:34:29 +0200
From: V?ro Herzl - Bluewin <veroh at bluewin.ch>
Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, 
Issue
	22
To: Oliver Christen <oliver.christen at camptocamp.com>,
	Cartoweb_Mailing_List <cartoweb-users at lists.maptools.org>
Message-ID: <46260245.4010109 at bluewin.ch>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hello.
So yes, the error is that in the documentation, you should not put 
at 
the end of the search.tpl <div id="search_results_div">/</div> but 
<div 
id="search_results">/</div>
so the line in the search.Ajax.js "$('search_results').innerHTML 
= 
pluginOutput.htmlCode.myconfig; " will work.
Thanks, now I can go to the chapter 24.3.1.1. "Guided search" and 
continue
This is a great plugin by the way.
Véronique

Oliver Christen a écrit :
> the response seems correctly formated
>
> I noticed something else.
> in your search.ajax.js , change :
> $('search_results').innerHTML = pluginOutput.htmlCode.
POSTGIS_MAJ;
> by
> $('search_results_div').innerHTML = pluginOutput.htmlCode.
POSTGIS_MAJ;
>
> and let me know if it works
>
> if it's ok, then it's an error in the documentation
>
> regards
> Oliver
>
>
> ----- Original Message ----- From: <veroh at bluewin.ch>
> To: <oliver.christen at camptocamp.com>
> Sent: Wednesday, April 18, 2007 11:03 AM
> Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, 
Issue 22
>
>
> So here we go. I only send th emessage to you as there is a limit 
for
> the cartoweb list.
>
> Véronique
>
>
> ----Message d'origine----
> De: oliver.christen at camptocamp.com
> Date: 18.04.2007 10:38
> À: <veroh at bluewin.ch> Copie: <cartoweb-users at lists.maptools.
org> 
> Objet: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24, 
Issue 22
>
> at first sight it looks ok, but we only see the beginning and 
the
> rest is
> cut because of the alert box.
> so we will have to change a bit the debugging.
>
> do you have the FireFox web developer addon ? if no, install it
> now:
> https://addons.mozilla.org/en-US/firefox/addon/60
>
> then in AjaxHandler.js
> remove alert(response.responseText);
> and write:
> xGetElementById('debugbox').innerHTML = '<pre>' + response.
> responseText +
> '</pre>';
>
> and in your cartoclient.tpl, add near the footer:
> <div id="debugbox"></div>
>
> make a cw3setup.php --clean so the template change is taken into
> account
>
> try again the search, then, using the web developer toolbar, 
choose
> the View
> Source->View Generated Source and have a look at the content of 
the
> <div
> id="debugbox"> element. Now we should see the complet response
> message.
>
> copy it and sent it to me
>
> regards
> Oliver
>
> ----- Original Message ----- From: <veroh at bluewin.ch>
> To: <oliver.christen at camptocamp.com>
> Cc: <cartoweb-users at lists.maptools.org>
> Sent: Wednesday, April 18, 2007 10:24 AM
> Subject: Re: [Cartoweb-users] RE: Cartoweb-users Digest, Vol 24,
> Issue 22
>
>
> OK, so after clearing the cache and restarting Apache (wamp), I 
got
> a
> message. Unfortunately, no ways that I could copy it so I did a
> printscreen and it is in the joined file.
>
> Hope it will help.
>
> Véronique
>
>
>
>
>
>
>
>
>
>
>
>
>



------------------------------

Message: 4
Date: Wed, 18 Apr 2007 13:50:21 +0200
From: Dirk Jesko <ml.dje at geocontent.de>
Subject: Re: [Cartoweb-users] Problem ini file parsing and 
question
	aboutswitches
To: Oliver Christen <oliver.christen at camptocamp.com>,	Cartoweb 
Users
	<cartoweb-users at lists.maptools.org>
Message-ID: <462605FD.3050506 at geocontent.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hello Oliver,

thanks. That worked. Maybe, you could help me with the other 
question 
that I wrote in the original post?

"I am still looking for a possibility to handle more than 200 
layers in 
one project. Since an extended plugin and recompiling mapserver 
are 
(currently) not an option, I thought about using children 
switching. 
Therefore, I divided the layers into two groups with less than 
200 
layers each and assigned a switch to each group. The map files for 
the 
switches are generated, but each file contains all layers. Based on 
the 
documentation I thought that the mapfiles generated for one switch 
would 
only contain the necessary layers. Am I doing something wrong? Is 
it 
possible at all to handle that many layers using children 
switching?"


Thanks very much,
Dirk



Oliver Christen wrote:
> well, the problem come from the loadFromArray function (defined 
in 
> Structhandler.php, called from ClientExportPdf.php)
> this function try to convert a string like foo.1.bar into a 
object 
> hierarchy like foo->1->bar and it doesnt like at all "->1" (in 
this 
> exemple)
>
> so I would suggest you simlpy modify the setPdfObjects function 
in 
> ClientExportPdf.php to feed the function a modified $ini_array, 
where 
> you would have removed the extra parameters you added with the 
syntax 
> foo.numericvalue.bar
>
> this way you can add as many extra parametesr you want with the 
> foo.numericvalue.bar syntax without having side effect on the 
normal 
> exportPdf code
>
> by the way, it is perfectly normal your cExportPdf.ini is 
ignored, 
> from cartoweb point of view, you are using the exportPdf plugin. 
You 
> would have the same problem if you added, css, js or images, You 
would 
> have to put them in the exportPdf folder.
>
> I hope this help
> regards
> Oliver
>
>> Hello Alexandre,
>>
>> that's my my plan. However, I can not figure out, how / where to 
add 
>> the additional keys. If I add them to exportPdf.ini (as proposed 
in 
>> the documentation), I get the error message. If I add them to 
>> cExportPdf.ini (cExportPdf is my plugin, which extends / 
replaces 
>> exportPdf) the entries are not available.
>>
>> I can not figure out, how the ini files are handled. For 
example, in 
>> location.ini or locate.ini, entries like
>>
>> scales.0.label = 500
>> scales.0.value = 500
>> scales.0.visible = true
>>
>> work, but if I use similar entries with a number in exportPdf, 
they 
>> do not work. How do I tell my plugin to read such kind of 
entries 
>> correctly without changing the original exportPdf plugin too 
much?
>>
>>
>> Regards,
>> Dirk
>>
>>
>>>> The simple problem that I can not solve is: How do I get my 
>>>> extended plugin to read the additional configuration entries 
so I 
>>>> can use them within the Client class?
>>>
>>> Have you tried to adapt the following code, available in 
>>> ClientLocate.php:
>>>
>>>         $locate = ConfigParser::parseObjectArray($this-
>getConfig(), 
>>> 'locate',
>>>                         array('id', 'sql'));
>>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>
>
>


------------------------------

Message: 5
Date: Wed, 18 Apr 2007 15:05:43 +0200
From: "Oliver Christen" <oliver.christen at camptocamp.com>
Subject: Re: [Cartoweb-users] Problem ini file parsing and 
question
	aboutswitches
To: "Dirk Jesko" <ml.dje at geocontent.de>,	"Cartoweb Users"
	<cartoweb-users at lists.maptools.org>
Message-ID: <1b8301c781ba$483d1010$15e3a8c0 at maunakea>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
	reply-type=response

as far I as know how the childrenswitching system work, it switchs 
layers 
(or layerGroups), not mapfiles
if only generate one mapfile, but give the layers an additional 
id 
corresponding to a selected switch

after discussing a bit with one of my colleague, the only way you 
have is to 
"duplicate" your projects and set in each a different mapfile
then you can use the project switcher menu to change easily from 
one to 
another
see the "Choose project" menu in http://www.cartoweb.
org/demos/client.php
name it "Choose mapfile" and the users wont notice they effectively 
change 
of project

to make things easier, one can certainly imagine to have the file 
of the 
projects "copies" to simply use symbolic links to the original 
project, with 
just the few different files in hard, like layers.ini and the 
mapfile
or use a automated deploying/copying script to generate the project 
copies 
easily

regards
Oliver


> Hello Oliver,
>
> thanks. That worked. Maybe, you could help me with the other 
question that 
> I wrote in the original post?
>
> "I am still looking for a possibility to handle more than 200 
layers in 
> one project. Since an extended plugin and recompiling mapserver 
are 
> (currently) not an option, I thought about using children 
switching. 
> Therefore, I divided the layers into two groups with less than 
200 layers 
> each and assigned a switch to each group. The map files for the 
switches 
> are generated, but each file contains all layers. Based on the 
> documentation I thought that the mapfiles generated for one 
switch would 
> only contain the necessary layers. Am I doing something wrong? Is 
it 
> possible at all to handle that many layers using children 
switching?"
>
>
> Thanks very much,
> Dirk
>
>
>
> Oliver Christen wrote:
>> well, the problem come from the loadFromArray function (defined 
in 
>> Structhandler.php, called from ClientExportPdf.php)
>> this function try to convert a string like foo.1.bar into a 
object 
>> hierarchy like foo->1->bar and it doesnt like at all "->1" (in 
this 
>> exemple)
>>
>> so I would suggest you simlpy modify the setPdfObjects function 
in 
>> ClientExportPdf.php to feed the function a modified $ini_array, 
where you 
>> would have removed the extra parameters you added with the 
syntax 
>> foo.numericvalue.bar
>>
>> this way you can add as many extra parametesr you want with 
the 
>> foo.numericvalue.bar syntax without having side effect on the 
normal 
>> exportPdf code
>>
>> by the way, it is perfectly normal your cExportPdf.ini is 
ignored, from 
>> cartoweb point of view, you are using the exportPdf plugin. You 
would 
>> have the same problem if you added, css, js or images, You would 
have to 
>> put them in the exportPdf folder.
>>
>> I hope this help
>> regards
>> Oliver
>>
>>> Hello Alexandre,
>>>
>>> that's my my plan. However, I can not figure out, how / where 
to add the 
>>> additional keys. If I add them to exportPdf.ini (as proposed in 
the 
>>> documentation), I get the error message. If I add them to 
cExportPdf.ini 
>>> (cExportPdf is my plugin, which extends / replaces exportPdf) 
the 
>>> entries are not available.
>>>
>>> I can not figure out, how the ini files are handled. For 
example, in 
>>> location.ini or locate.ini, entries like
>>>
>>> scales.0.label = 500
>>> scales.0.value = 500
>>> scales.0.visible = true
>>>
>>> work, but if I use similar entries with a number in exportPdf, 
they do 
>>> not work. How do I tell my plugin to read such kind of entries 
correctly 
>>> without changing the original exportPdf plugin too much?
>>>
>>>
>>> Regards,
>>> Dirk
>>>
>>>
>>>>> The simple problem that I can not solve is: How do I get my 
extended 
>>>>> plugin to read the additional configuration entries so I can 
use them 
>>>>> within the Client class?
>>>>
>>>> Have you tried to adapt the following code, available in 
>>>> ClientLocate.php:
>>>>
>>>>         $locate = ConfigParser::parseObjectArray($this-
>getConfig(), 
>>>> 'locate',
>>>>                         array('id', 'sql'));
>>>>
>>> _______________________________________________
>>> Cartoweb-users mailing list
>>> Cartoweb-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>
>>
>>
> 



------------------------------

_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users


End of Cartoweb-users Digest, Vol 24, Issue 26
**********************************************






More information about the Cartoweb-users mailing list