<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>it depends a bit of what you want to do exactly.</FONT></DIV>
<DIV><FONT size=2>Cartoweb use a query by shape to get features ids from
shapefiles. Practicaly, the query tools (<FONT
size=3>QueryByPoint,QueryByBbox,QueryByPolygon,QueryByCircle</FONT>) generate a
feature (point, rectangle, polygon, circle) which is given to the query plugin,
that feature is then used by the query plugin to do a queryByShape in the
mapfile through the mapQuery plugin.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>if you want to select an area on the map to get the ids of the
underlying features and do some other actions with those ids, you can override
the query plugin to do some extra actions once the mapQuery plugin has returned
the query result to the Query plugin.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>You can do that by extending the Query plugin (see <SPAN
class=sect2><A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending"><FONT
size=3>2.3.3. Extending a Plugin</FONT></A> in the documentation, <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></SPAN>)
and overriding the function processResult and initializeResult.</FONT></DIV>
<DIV><FONT size=2>These 2 functions receive the query result and call the Table
plugin to format the result so it can be displayed in the user interface, but
you can certainly add some condition (for example by passing an extra parameter)
to handle differently the query result.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>once you have the query result, you can simply parse it and do
what you want with them, like querying a database.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>there should be some examples of plugin override in the
mailing-list archive, also have a look at the <A
href="http://www.cartoweb.org/cwiki/HowTo">http://www.cartoweb.org/cwiki/HowTo</A> if
you are not used to the plugins structure and logic, there are a few simple
examples.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=luzanilton.bsi@gmail.com
href="mailto:luzanilton.bsi@gmail.com">Luzanilton Filho</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, February 18, 2010 12:57
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Get ID
(shapefile) for search in other DB</DIV>
<DIV><BR></DIV>Please, Mrs
<DIV><BR></DIV>
<DIV>How to i, get the ID in shapefile and search this ID in other database
(mysql) for example.</DIV>
<DIV><BR></DIV>
<DIV>Regards</DIV>
<DIV><BR>Luzanilton
Filho<BR>----------------------------------------------------------------------<BR>Analista
de Sistemas<BR>Sistemas de Informação<BR><A
href="mailto:luzanilton@gmail.com">luzanilton@gmail.com</A><BR><A
href="mailto:luzanilton@hotmail.com">luzanilton@hotmail.com</A><BR></DIV>
<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>