[Cartoweb-users] Automatically turn on the layer after recentering

Oliver Christen oliver.christen at camptocamp.com
Mon Mar 2 04:15:51 EST 2009


Hi

well, you need to know what are the parameter received by PHP on the server.

an easy (but not pretty) way to do that is to add
print_r($_REQUEST);
at the end (but before the ?>) of the client.php file in cartoweb3/htdocs/
this way you can see which parameter are effectively passed and which are 
not and correct your javascript/html accordingly

regards
Oliver

----- Original Message ----- 
From: "Jady" <jadychow at gmail.com>
To: <cartoweb-users at lists.maptools.org>
Sent: Monday, March 02, 2009 3:56 AM
Subject: Re: [Cartoweb-users] Automatically turn on the layer after 
recentering


>
> Hi Oliver,
>
> Thanks so much for the reply.
> However, it still couldnt turn the layer on.  I added
> 'document.forms['carto_form'].layer_select.value = input_element.alt;'
> immediately after 'document.forms['carto_form'].id_recenter_ids.value =
> item.id;' and before ' CartoWeb.trigger('Location.Recenter', 
> 'doSubmit()');'
> in the locate.tpl.  I also added the hidden input 'layer_select' in the 
> tpl,
> but still the layer is not on.
>
> Best regards,
> jady
>
>
> Oliver Christen wrote:
>>
>> Hi
>>
>> simply add a layer_select=your-layer-name at the same time you do the
>> recentering
>>
>> practicaly, for the locate plugin, simply modify the locate.tpl template
>> and
>> add the following instruction in the javascript function locate :
>> document.forms['carto_form'].layer_select.value = input_element.alt;
>>
>> obviously you need a hidden input somewhere named "layer_select", if it's
>> not already in your templates, simply add it.
>>
>> regards
>> Oliver
>>
>> ----- Original Message ----- 
>> From: "Jady" <jadychow at gmail.com>
>> To: <cartoweb-users at lists.maptools.org>
>> Sent: Monday, February 09, 2009 4:49 AM
>> Subject: [Cartoweb-users] Automatically turn on the layer after
>> recentering
>>
>>
>>>
>>> Hi all,
>>>
>>> I would like the application to turn on the layer automatically after
>>> recentering(by the Locate plugin and in the search results table, etc) 
>>> to
>>> a
>>> feature.  Is this possible?
>>>
>>> Thanks very much for any help!
>>>
>>> Best regards,
>>> Jady
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Automatically-turn-on-the-layer-after-recentering-tp21906729p21906729.html
>>> Sent from the cartoweb-users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Automatically-turn-on-the-layer-after-recentering-tp21906729p22281287.html
> Sent from the cartoweb-users mailing list archive at Nabble.com.
>
> _______________________________________________
> 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