[Cartoweb-users] colored result from search action
Oliver Christen
oliver.christen at camptocamp.com
Wed Sep 26 05:55:07 EDT 2007
Hi
hilighting of feature is only possible with filter (parameters) via query
http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.special.filters
so you need to pass the additional parameters:
query_layer=*layer name*
query_select=*feature id*
query_hilight=1
query_return_table=0
and
layer_select=*layer name*
in locate.tpl, you have:
document.forms['carto_form'].id_recenter_layer.value =
input_element.alt;
document.forms['carto_form'].id_recenter_ids.value = item.id;
right there, add:
var l1 = $('locate1');
var l2 = $('locate2');
var l3 = $('locate3');
var l4 = $('locate4');
var l5 = $('locate5');
l1.name = 'query_layer';
l1.value = input_element.alt;
l2.name = 'query_select';
l2.value = item.id;
l3.name = 'query_hilight';
l3.value = 1;
l4.name = 'query_return_table';
l4.value = 0;
l5.name = 'layer_select';
l5.value = input_element.alt;
and at the end, add:
<input type="hidden" id="locate1" />
<input type="hidden" id="locate2" />
<input type="hidden" id="locate3" />
<input type="hidden" id="locate4" />
<input type="hidden" id="locate5" />
clean your cache and try again
maybe there is a nicer way to do that but it works and that was quick to do
regards
Oliver
>
> How can I get searched element by locate plugin colored (highlighted)
> pls.?
> --
> View this message in context:
> http://www.nabble.com/colored-result-from-search-action-tf4520773.html#a12896293
> 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