<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY class=hmmessage bgColor=#ffffff>
<DIV><FONT face=Arial>Hi</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>DemoCS ? you mean the "Direct access" dropdown menu at the
top?</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>So what you want to do is:</FONT></DIV>
<DIV><FONT face=Arial>by selecting a object in a dropdown menu, it
would:</FONT></DIV>
<DIV><FONT face=Arial>1) recenter on the object</FONT></DIV>
<DIV><FONT face=Arial>2) trigger the edition so the feature is loaded from
database and activated in the dhtml so you can edit it</FONT></DIV>
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>for 1) you simply use the existing recenter filters (<A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.special.filters">http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.special.filters</A>)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial>for 2) you can use the </FONT></DIV>
<DIV><FONT face=Arial>"edit_layer_id" and</FONT></DIV>
<DIV><FONT face=Arial>"edit_features_ids"</FONT></DIV>
<DIV><FONT face=Arial>parameters</FONT></DIV>
<DIV><FONT face=Arial>these are undocument and the truth is I just discovered
them when trying to answer you question. I will complet the
documentation.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>BUT, these two parameters (edit_layer_id and
edit_features_ids) are intended to be used via the url (for example: <A
href="http://www.cartoweb.org/demos/demoEdit.php?edit_layer_id=edit_point&edit_features_ids=459">http://www.cartoweb.org/demos/demoEdit.php?edit_layer_id=edit_point&edit_features_ids=459</A>)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>So, if you want to use them in a plugin so you can do the
recenter and the edit selection at once, you will have to extend a little bit
the edit plugin.</FONT></DIV>
<DIV><FONT face=Arial><A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending">http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending</A></FONT></DIV>
<DIV><FONT face=Arial>the only function you need to extend is
handleHttpPostRequest !</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>More specificaly, copy the content of edit's
handleHttpGetRequest into your extended edit plugin's
handleHttpPostRequest</FONT></DIV>
<DIV><FONT face=Arial>(well, in fact not copy as the "if (isset ($_GET[...]))"
will obviously not work when using POST but the idea is to check if the two
parameters are in the $request object and if yes, recover the values and store
them in variables)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Once you have extended the edit plugin, all you need is
then to, in your other plugin (the one that will manage the recenter and edit
feature activation) set all the parameters needed via the filterPostRequest
function (your plugin class will have to implement filterProvider)</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>if you want an example, simply look at the plugin
"outline" ClientOutline.php function filterGetRequest and see documentation <A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.special.filters">http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.special.filters</A></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>good luck</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Regards</FONT></DIV>
<DIV><FONT face=Arial>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=tekuganda@hotmail.com href="mailto:tekuganda@hotmail.com">Broun
Uganda</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> Tuesday, November 27, 2007 1:50
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Edit plugin
recenter and edit</DIV>
<DIV><BR></DIV><BR>Dear All,<BR>I would like to implement a recenter in a way
that allows me to edit the feature i select.<BR>Example would be something
like. Query database and find a feature house14 in layer Houses, recenter and
select this house14 for editing. How would i be able to achieve this? I can
see DemoCS example does something similar with a preset list of features but i
don't access to this example.<BR>Thank you<BR>Broun Uganda<BR><BR><BR><BR>
<HR>
Discover the new Windows Vista <A
href="http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE"
target=_new>Learn more!</A>
<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>