[Cartoweb-users] Cartoweb Tables

Oliver Christen oliver.christen at camptocamp.com
Mon Mar 31 03:00:12 EDT 2008


Be sure you have at least some knowledge in PHP programmation. If not, I would strongly suggest either ask for the help of some programmer or follow some programmation tutorials.

You have to create a plugin. This plugin will query the Postgres/postgis database.
You can use the Tables plugin to format the query result, but that's not an obligation.

Please read carefuly the chapter 2 of the developer manual http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html
and understand the data flow in Cartoweb http://www.cartoweb.org/doc/misc/plugins_diagram.pdf

Your plugin will only need a Client part, I think.
If the data you want to display depends of the layers selected/displayed, you can get the list of active layers like this:
$layersPlugin = $this->cartoclient->getPluginManager()->getPlugin('layers');
$activatedLayers = $layersPlugin->getSelectedLayers();

Have a look at the examples in http://www.cartoweb.org/cwiki/HowTo 
Im sure there are several pieces of code you can easily use.

Looking at existing plugins to see what they contain and how they work can help you a lot too.

And dont forget to search the mailing-list, maybe some of your futur problems/questions have already been answered http://lists.maptools.org/search.phtml?config=cartoweb-users


  ----- Original Message ----- 
  From: Madura Weerasinghe 
  To: cartoweb-users at lists.maptools.org 
  Sent: Saturday, March 29, 2008 5:01 PM
  Subject: [Cartoweb-users] Cartoweb Tables


  I'm an undergraduate of University of Colombo, Sri Lanka. I'm developing an on-line traffic information system using Cartoweb. I would like to thank u people for developing such a great piece of software. Anyway I have a small problem and I would be grateful if u can help me. The problem is this.

  The map is generated using data stored in a PostGIS database. When the map loads in the browser, I want to display some information in a table, retrieved from the database. (As in the query plugin, but without any user intervention and it should be automatically displayed when the map loads). As I feel, I think Tables plugin should be integrated with the layers plugin. Please help me to achieve this task (how to do this).

  So again I would be grateful to u.

  Thank you in advance.


  Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost.


  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080331/7b798d08/attachment.html

More information about the Cartoweb-users mailing list