Hi, I often do that.
For instance: I use the geographical objects in a table but with few attributes. This is the layer I have in the TOC. Then I use the same geographical table, but joined with attributes tables. Those are the queriable layers in my mapfile. So only 1 is shown, but the other are searchable. But I use the "<sql_where>" in the search.xml file. And it works great. The results are available in the result js window, and the "zoom to" icon works too... Thomas [EMAIL PROTECTED] a écrit : > I understand, thanks for the info. > > I have accidentaly realised that by putting this layer in config.ini and > removing from categories list (if you use categories of course) the layer > is not shown but I can query it successfully :-) > > Just a note related to query: > > On my Linux Ubuntu (dapper) machine, I have installed mapscript package > php5-mapscript version 4.6.1-6ubuntu2. It doesn't work correctly when > using this part of query.php: > > if ($layFilter = $this->qLayer->getFilter()) { > $this->qStr = "($layFilter AND $this->qStr)"; > pm_logDebug(3, $this->qStr, "query string including FILTER > -- query.php->q_execAttributeQuery"); > } > > I get no results in attribute search and debug.log has an additional entry > that seems like the cause: > > [30-Oct-2008 09:14:48] P.MAPPER debug info > query string including FILTER -- query.php->q_execAttributeQuery > ("(null)" AND ( ( "[TEXT]" =~ /(2|2)(4|4)(3|3)(2|2).(1|1)(6|6)/ ) )) > > After removing this part, everything is ok. > > regards, dejan > > "Armin Burger" <[EMAIL PROTECTED]> wrote on 30.10.2008 11:19:05: > > >> You can try to modify this behaviour in toc.js. But if you use >> categories then you will have overlapping functions to enable/disable >> the checkbox and you need to figure out which logic you want, and then >> modify everything accordingly. >> >> armin >> >> On Thu, Oct 30, 2008 at 8:06 AM, <[EMAIL PROTECTED]> wrote: >> >>> I agree with you Armin. I really don't need this necessarily. >>> >>> What I wanted - I have a point layer with 27.000 points labeled by a >>> cadastrial number. When I try to turn on this layer at full extent, it >>> freezes and never ends. So I put MAXSCALE for this layer and >>> > everything > >>> works ok. The layer description in TOC is "dimmed" when the layer is >>> > not > >>> shown, which is OK, but the check box next to description is not. So >>> > it was > >>> much simpler for me to just hide this layer instead of trying to >>> > figure out > >>> how to "disable"/dim the checkbox too :-) >>> >>> Do you have a quick solution for this? >>> >>> thanks very much >>> >>> regards, dejan >>> >>> Armin Burger <[EMAIL PROTECTED]> wrote on 30.10.2008 00:41:46: >>> >>> >>>> Layers that are not in the config.ini will very likely not work with >>>> various functions like queries since they are not referenced in the >>>> p.mapper layer and groups objects (thats different objects than pure >>>> Mapscript layers). Hence they produce errors when trying to read some >>>> specific attributes. >>>> >>>> What you mention is more a solution for always displaying >>>> > annotations, > >>>> north arrows, copyright notice, a permanent background raster layer, >>>> > etc. > >>>> I personally would find it a bit confusing seeing something on the >>>> > map > >>>> and in the query but not in the Toc/legend. >>>> >>>> armin >>>> >>>> On 29/10/2008 23:12, [EMAIL PROTECTED] wrote: >>>> >>>>> Hi, >>>>> >>>>> I want to display a point layer (labeled by its attribute field) on >>>>> > the > >>>>> map, without showing it in TOC/legend. If I am correct, it can be >>>>> > done > >>>>> by >>>>> setting the status of the layer to DEFAULT in map file and removing >>>>> > it > >>>>> from config.ini. Then it is drawn always. >>>>> >>>>> This works fine but doing attribute search by its attribute field >>>>> returns >>>>> error: >>>>> >>>>> [29-Oct-2008 22:55:27] PHP Fatal error: Call to a member function >>>>> getXYLayerProperties() on a non-object in >>>>> C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\query\query.php on line >>>>> > 730 > >>>>> [29-Oct-2008 22:55:27] PHP Stack trace: >>>>> [29-Oct-2008 22:55:27] PHP 1. {main}() >>>>> C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\xajax\x_info.php:0 >>>>> [29-Oct-2008 22:55:27] PHP 2. Query->q_processQuery() >>>>> C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\xajax\x_info.php:44 >>>>> [29-Oct-2008 22:55:27] PHP 3. Query->q_execAttributeQuery() >>>>> C:\ms4w\apps\pmapper\pmapper-3.2.0\incphp\query\query.php:94 >>>>> >>>>> The question is - is this supposed to be so or can I do something >>>>> > to > >>>>> enable attribute search for this layer? >>>>> >>>>> thanks very much >>>>> >>>>> regards, dejan >>>>> >>>>> >>>>> > ------------------------------------------------------------------------- > >>>>> This SF.Net email is sponsored by the Moblin Your Move >>>>> Developer'schallenge >>>>> Build the coolest Linux based applications with Moblin SDK & win >>>>> >>>> great prizes >>>> >>>>> Grand prize is a trip for two to an Open Source event anywhere in >>>>> > the > >>>>> world >>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>> _______________________________________________ >>>>> pmapper-users mailing list >>>>> pmapper-users@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/pmapper-users >>>>> >>>>> > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users > > > > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users