Hi Stefan
im just looking at the stack of unanswered message in the Cartoweb mailing
list and noticed your question.
to highlight a feature, you only need is to edit the locate.tpl template to
add some hidden form element values.
in the locate.tpl template you can see:
document.forms['carto_form'].id_recenter_layer.value = input_element.alt;
document.forms['carto_form'].id_recenter_ids.value = item.id;
simply add the following lines:
document.forms['carto_form'].query_layer.value = input_element.alt;
document.forms['carto_form'].query_select.value = item.id;
document.forms['carto_form'].query_hilight.value = 1;
also, you need to add these two extra line to reset the query_layer and
query_select values after submiting the recentering, otherwise the
parameters stay set in the main document and may interfer with the normal
querying tools.
so, after the line:
CartoWeb.trigger('Location.Recenter', 'doSubmit()');
add:
document.forms['carto_form'].query_layer.value = "";
document.forms['carto_form'].query_select.value = "";
regards
Oliver
----- Original Message -----
From: "Stefan Neumeier" <[email protected]>
To: <[email protected]>
Sent: Thursday, October 14, 2010 4:02 PM
Subject: [Cartoweb-users] locate plugin how to hilight feature
> Dear all,
>
> I want to hilight the feature the locate plugin centers to.
> Unfortunately I can not figure out how to achieve this.
> Has someone of you managed to implement a hilight function to the locate
> plugin and if yes, could you please
> give me some step by step information how you have done it?
>
> regards,
> Stefan
> _______________________________________________
> Cartoweb-users mailing list
> [email protected]
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users