[Cartoweb-users] Problem with Recentering on search results
Oliver Christen
oliver.christen at camptocamp.com
Wed May 2 10:32:22 EDT 2007
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" <ml.dje at geocontent.de>
To: "Cartoweb Users" <cartoweb-users at 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 at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
More information about the Cartoweb-users
mailing list