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

Jady jadychow at gmail.com
Sun Mar 1 21:56:52 EST 2009


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.



More information about the Cartoweb-users mailing list