Hi it depends a bit of what you want to do exactly. Cartoweb use a query by shape to get features ids from shapefiles. Practicaly, the query tools (QueryByPoint,QueryByBbox,QueryByPolygon,QueryByCircle) 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.
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. You can do that by extending the Query plugin (see 2.3.3. Extending a Plugin in the documentation, http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending) and overriding the function processResult and initializeResult. 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. once you have the query result, you can simply parse it and do what you want with them, like querying a database. there should be some examples of plugin override in the mailing-list archive, also have a look at the http://www.cartoweb.org/cwiki/HowTo if you are not used to the plugins structure and logic, there are a few simple examples. regards Oliver ----- Original Message ----- From: Luzanilton Filho To: [email protected] Sent: Thursday, February 18, 2010 12:57 AM Subject: [Cartoweb-users] Get ID (shapefile) for search in other DB Please, Mrs How to i, get the ID in shapefile and search this ID in other database (mysql) for example. Regards Luzanilton Filho ---------------------------------------------------------------------- Analista de Sistemas Sistemas de Informação [email protected] [email protected] ------------------------------------------------------------------------------ _______________________________________________ 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
