[Cartoweb-users] get layer name

Oliver Christen oliver.christen at camptocamp.com
Mon Dec 3 09:00:39 EST 2007


Hi

well, you should already have the layer id before triggering the query.
if the layers has not been specified, then the query is done on a loop on all layers I believe.

ClientQuery generate the request object and set the list of layers to query. ServerQuery receive the list and do a foreach on it and call ServerMapquery on all layers.

The result for all queries is then formated via the ServerTable plugin, and one table object is generated for all query ($table->tableId = $layerId;)
The tables object are then returned to client side via $queryResult->tableGroup->tables

So practicaly, on the client side, get the tableGroup object and loop on its tables and get the table id, you will know which layer returned something.
(though I do believe even empty result table are returned so I suppose you also need to look in the table object if it contain something or not)

regards
Oliver
  ----- Original Message ----- 
  From: guillaume champlong 
  To: carto web 
  Sent: Monday, December 03, 2007 10:41 AM
  Subject: [Cartoweb-users] get layer name


  Hi all,

  I am customizing the the way to use the returned atributes from a queryByPoint, and I would like to know how to get the name of the layer I just clicked, for use in my tables.ajax.js file.


  Thanks.
  G


------------------------------------------------------------------------------
  Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


------------------------------------------------------------------------------


  _______________________________________________
  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
  http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071203/571f96d1/attachment.html


More information about the Cartoweb-users mailing list