[Cartoweb-users] Re: Re : Problem with Recentering on search results

Dirk Jesko ml.dje at geocontent.de
Thu May 3 03:35:11 EDT 2007


Hello Véronique,

thanks. Now, recentering on a result works with

function recenter(id){
    if ($('search_config').value == 'Adresses') {
        $('id_recenter_ids').value = id; //id to recenter
        CartoWeb.trigger('Location.Recenter');
    }
}

My search works perfectly on seven columns (id, company name, city, 
postal code, ...) of one table. I did everything according to the 
documentation. After I found out, how the input fields etc. have to be 
named, everything was fine. If I am not mistaken, there was one error in 
the documentation. In Search.ajax.js, it should be 'if 
(pluginOutput.htmlCode.Adresses) {' instead of 'if 
(pluginOutput.htmlCode.myconfig) {'. If it helps, I could send you my 
configuration and templates.

One thing that I do not like about the provided full text search is the 
use of LIKE in the where clause, since you have to be careful with upper 
and lower case. Therefore, I wrote my own provider using ~*, so I can 
use regular expressions and it ignores upper and lower case.

I will now try a guided search.

Regards,
Dirk



Véro Herzl - Bluewin wrote:
> Hello,
>
> Yep, I think I know what is wrong. Try by putting
> /
> $('id_recenter_ids').value = id; //id to recenter
> //$('recenter_scale').value = 2000;//scale for recentering
> //$('recenter_doit').value = '0'; LINE TO CHANGE !!!!!
> //CartoWeb.trigger('Location.Recenter');/
>
> If I remember right I told it already to camptocamp so they can change 
> the documentation but unfortunately, it is not already done.
>
> By the way, if ever you succeded in implementing the search plugin 
> with two columns of the same table or two columns of two different 
> tables, and if it is possible for you, I would kindly receive any 
> information on how to do it work as the documentation does not seem to 
> help me on that point.
>
> Regards
>
> Véronique
>


More information about the Cartoweb-users mailing list