[Chameleon] Query Widget Bug?

Corey Puffalt cplists at gmail.com
Thu Mar 10 16:39:28 EST 2005


David,

In case you have something to add to the bug report you can see it here: 

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1284

Corey


On Thu, 10 Mar 2005 13:35:15 -0500, David Dabney <David.Dabney at noaa.gov> wrote:
> All,
> 
> I'm just getting into using Chameleon and had a problem recently with
> Postgis layers returning only tile_index, shape_index, and layer_index.
> For the using clause in the map file, I was referencing a unique key
> that was varchar(3).  Once I added a bigint column and used that
> instead, the layers started to show up.
> 
> Not sure if this is anywhere close to the same as your issue, but
> thought I'd throw it out there just in case.
> 
> -Dave
> 
> Paul Spencer wrote:
> 
> > um.  I don't remember off hand, that code is a hold-over from our
> > first implementation and the logging stuff has been mostly removed or
> > disabled.  IIRC, those classes are derived from the Logger class so
> > you can look at the API for Logger (htdocs/common/logger) and where
> > the MapQuery object is created, you can direct it to use a file for
> > logging
> >
> > Cheers
> >
> > Paul
> >
> > Corey Puffalt wrote:
> >
> >> Will do... A question first, how can I turn on the logging for classes
> >> that are using the Logger class?
> >>
> >> Thanks,
> >> Corey
> >>
> >>
> >> On Thu, 10 Mar 2005 13:03:43 -0500, Paul Spencer
> >> <pspencer at dmsolutions.ca> wrote:
> >>
> >>> Corey,
> >>>
> >>> I honestly think this is a problem in the postgis driver rather than a
> >>> mapserver or chameleon problem.  Can you post the details on the
> >>> mapserver list to see if any of the refractions guys respond?
> >>>
> >>> Paul
> >>>
> >>> Corey Puffalt wrote:
> >>>
> >>>> Paul,
> >>>>
> >>>> First a bit more information:  I have a number of layers that do not
> >>>> exhibit this problem and a number that do.  All of these layers are
> >>>> postgis layers... in fact, all the layers query the same table.  The
> >>>> only difference is the FILTER parameter.  (Each layer differs in that
> >>>> the data is specific to a particular company.)  The only difference
> >>>> I've been able to identify between the layers that do work and the
> >>>> ones that don't are where the geometry data is located (Canada vs. US
> >>>> mostly)... the layers with lines in the US appear to have this eror.
> >>>> I've discovered sometimes no error is printed in the pop-up query box
> >>>> but what I get instead is a table with just the SHAPE_INDEX,
> >>>> TILE_INDEX & LAYER_INDEX columns (the layer attributes are all
> >>>> missing).  In both cases, the map in the map window fails to render
> >>>> (broken image in the browser.)
> >>>>
> >>>> Mapscript is being used as a module AFAIK.  (Default FGS setup.)
> >>>>
> >>>> PHP:
> >>>>
> >>>>
> >>>>> ./php4 -v
> >>>>
> >>>>
> >>>> PHP 4.3.10 (cgi) (built: Feb  9 2005 18:44:59)
> >>>> Copyright (c) 1997-2004 The PHP Group
> >>>> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
> >>>>
> >>>> I notice that the MapQuery class extends Logger and uses it to log a
> >>>> bunch of information.  How do I enable the logging and set the
> >>>> filename appropriately?  Can I access this Logger and control it when
> >>>> I initialize my Chameleon subclass?
> >>>>
> >>>> Thanks for your help,
> >>>> Corey
> >>>>
> >>>> On Thu, 10 Mar 2005 12:28:16 -0500, Paul Spencer
> >>>> <pspencer at dmsolutions.ca> wrote:
> >>>>
> >>>>
> >>>>> damn.  Thats exactly my version.
> >>>>>
> >>>>> do you know what layer is being queried when you get this error?
> >>>>> At the
> >>>>> point that Chameleon gets to this line, MapScript has already
> >>>>> reported a
> >>>>> certain number of results and this code is the correct way to read
> >>>>> the
> >>>>> results AFAIK.
> >>>>>
> >>>>> A couple of thoughts/ideas/questions:
> >>>>>
> >>>>> * $oShape->free() should probably be called at the end of the loop
> >>>>> (just
> >>>>> before // end for loop)
> >>>>>
> >>>>> * what type of layer is being queried?  Is it, perchance, a postgis
> >>>>> layer or some other spatial database layer?  My thought here is
> >>>>> that the
> >>>>> connection may be getting corrupted or timed out or something
> >>>>>
> >>>>> * are you using MapScript as a cgi or a module?
> >>>>>
> >>>>> * what version of PHP are you using
> >>>>>
> >>>>> I've also cc'd Daniel Morissette to see if there is anything in the
> >>>>> MapServer core that would indicate why you would get this particular
> >>>>> error message from this particular mapscript call.
> >>>>>
> >>>>> Cheers
> >>>>>
> >>>>> Paul
> >>>>>
> >>>>> Corey Puffalt wrote:
> >>>>>
> >>>>>
> >>>>>> Yeah that's what I thought too... :P  I've left the chameleon stuff
> >>>>>> untouched so it should be exactly what you have (at least as
> >>>>>> distributed by the FGS project.)
> >>>>>>
> >>>>>> At any rate, I've attached the file... the line referred to seems to
> >>>>>> be this one:
> >>>>>>
> >>>>>>           $oShape = $oLayer->getShape($oResult->tileindex,
> >>>>>>
> >>>>>> $oResult->shapeindex);
> >>>>>>
> >>>>>> Corey
> >>>>>>
> >>>>>> On Thu, 10 Mar 2005 11:39:20 -0500, Paul Spencer
> >>>>>> <pspencer at dmsolutions.ca> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Corey, this is strange.  That line in my copy of map_query is
> >>>>>>> nowhere
> >>>>>>> where this error could come from.
> >>>>>>>
> >>>>>>> Can you send me your map_query.php please.
> >>>>>>>
> >>>>>>> Paul
> >>>>>>>
> >>>>>>> Corey Puffalt wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Hello...
> >>>>>>>>
> >>>>>>>> Every now and again I'm getting the following error appearing when
> >>>>>>>> using the Query widget.  I'm not yet sure what's triggering the
> >>>>>>>> problem though it does appear specific to certain queryable
> >>>>>>>> layers.
> >>>>>>>> The following error message appears in the Query pop-up window:
> >>>>>>>>
> >>>>>>>> Fatal error: [MapServer Error]: msQueryByPoint(): No matching
> >>>>>>>> record(s) found. in
> >>>>>>>> /stuff/fgs-chameleon_2.0/apps/chameleon-2.0/htdocs/common/wrapper/map_query.php
> >>>>>>>>
> >>>>>>>> on line 561
> >>>>>>>>
> >>>>>>>> Any ideas?
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Corey
> >>>>>>>
> >>>>
> >>>> _______________________________________________
> >>>> Chameleon mailing list
> >>>> Chameleon at lists.maptools.org
> >>>> http://lists.maptools.org/mailman/listinfo/chameleon
> >>>>
> >>>
> >>> --
> >>> +-----------------------------------------------------------------+
> >>> |Paul Spencer                           pspencer at dmsolutions.ca   |
> >>> +-----------------------------------------------------------------+
> >>> |Applications & Software Development                              |
> >>> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> >>> +-----------------------------------------------------------------+
> >>>
> >>
> >> _______________________________________________
> >> Chameleon mailing list
> >> Chameleon at lists.maptools.org
> >> http://lists.maptools.org/mailman/listinfo/chameleon
> >>
> >
> 
> --
> ~~~~~~~~~~~~~~~~~~~~~~~
> David Dabney
> NOAA Hollings Marine Lab/JHT
> 331 Fort Johnson Rd
> Charleston, SC 29412
> 843.762.8984
> david.dabney at noaa.gov
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>


More information about the Chameleon mailing list