about the recentering system in cartoweb:

you can recenter on object id
with the following parameters:
id_recenter_layer, id_recenter_ids
recenter_scale is ignored, it will use the scale set in location.ini on server side, parameter "recenterDefaultScale" do no set the recenter_doit, the id_recenter_layer and id_recenter_ids wont be processed and the recentering will not work !

you can recenter on x,y
with the following parameters:
recenter_x, recenter_y
recenter_scale can be used in this case
recenter_doit must be used and set to 1 if the recentering request is sent via POST, you dont need to set it if the request is sent via GET

you can recenter on bbox
with the following parameters:
recenter_bbox
all other parameters are ignored

regards
Oliver


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" <[email protected]>
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
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users


_______________________________________________
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

Reply via email to