the plugin search recentering use in fact Cartoweb default recentering
system, meaning you must set the corresponding hidden input need to trigger
a recentering
these input are included in your template only if you have activated some of
the coreplugin subelements, like scale dropdown and things like that
if you deactivated some coreplugin sub templates, you must add manually
these input via the search plugin template
in this case, try adding
<input type="hidden" id="id_recenter_layer" name="id_recenter_layer" />
in the main cartoclient template
and set its value in the search javascript in the same way as
$('id_recenter_ids').value = id;
its possible there are other missing hidden input, I need to have a look, i
dont remember by head of all of them
regards
Oliver
----- Original Message -----
From: "Dirk Jesko" <[EMAIL PROTECTED]>
To: "Cartoweb Users" <cartoweb-users@lists.maptools.org>
Sent: Wednesday, May 02, 2007 4:21 PM
Subject: [Cartoweb-users] Problem with Recentering on search results
Hello,
I setup the search plugin in my project according to the documentation.
Everything is working, except for the recentering on search results. The
documentation suggests:
$('id_recenter_ids').value = id; //id to recenter
$('recenter_scale').value = 2000;//scale for recentering
$('recenter_doit').value = '1';
CartoWeb.trigger('Location.Recenter');
If I do this, only the scale is changed, but the center of the map does
not change. If I remove the line that sets recenter_scale, it changes the
position, but keeps the scale. Any idea, what is wrong?
Thanks,
Dirk
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users