<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>you need to create a simple filtering plugin that implements
FilterProvider.</FONT></DIV>
<DIV><FONT size=2>then simply detect if you are doing a recentering (usualy by
checking if the recentering variables names exist in $_REQUEST) and if so, do a
recenter_scale:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>class ClientRecenter extends ClientPlugin implements
FilterProvider { </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> public function
filterPostRequest(FilterRequestModifier $request) {</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> if
(!empty($_REQUEST['recenter_x']) && !empty($_REQUEST['recenter_y']))
{<BR>
$request->setValue('recenter_scale',
'20000');<BR>
$request->setValue('recenter_doit',
'1');<BR> }</FONT></DIV>
<DIV><FONT size=2> }</FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>if you use id recentering, simply modify/complet
the condition to check id_recenter_ids existance</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=a.muzzetta@i4es.it href="mailto:a.muzzetta@i4es.it">Alessandro
Muzzetta</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=Cartoweb-users@lists.maptools.org
href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, January 24, 2008 1:42
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Zooming in
after recenter</DIV>
<DIV><BR></DIV>Dear Cartoweb users,<BR><BR>I have followed the recentering
example in Cartoweb to recenter the map on a specific (x,y)
coordinate.<BR>However, if the map is fully shown, then nothing happens.
Only if it is already zoomed does the recentering move the map, which is a
logical thing. How can I make the map zoom to a specified level before
recentering? <BR><BR>Thanks for any help<BR clear=all><BR>-- <BR>Alessandro
Muzzetta<BR>IES Solutions Srl<BR>Catania Office<BR>Via Vulcano 10 - I-95030
Gravina di Catania, Italy<BR>Email: <A
href="mailto:a.muzzetta@i4es.it">a.muzzetta@i4es.it </A><BR>Phone/Fax: +39
095211640<BR>Skype: alex-tecnia
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BODY></HTML>