[ka-Map-users] Think There is a bug in map_query_float.php
walker at mfgis.com
Tue Jun 19 15:23:19 EDT 2007
I would like to follow up on this thread from March, as I have found what
may be the same or a related problem. The thread appears to have died
without resolution, I've repeated it below.
The problem I have discovered (whether the same or different) arises when
there are two or more search-able, scale-dependent themes within the same
GROUP. (In my case, the motivation was to represent the same data, yet
have its symbol change from a point to an image when the zoom level was
Schematically (not actually) the relevant parts of the map file looks like:
At any given scale, only one of the two will be visible, and it would be
hoped that only one would be queryable. I am guessing that by sharing a
GROUP name, map_query_float.php is making all of the layers within the
Depending upon (some factor which I have not determined) the results of
such a query will either be a duplicate set of results OR an error message
of the effect "msQueryByRect() no matching records found in
map_query_float.php on line 233"
The immediate solution is to not have multiple, scale-dependent searchable
themes within the same GROUP.
A more robust solution may be found in map_query_float.php beginning
around line 172 and especially at about line 180 which seems to be turning
a layer's visibility on (for querying?)
If I am reading the code correctly (a BIG if) it seems the layer is being
queried if any members of its GROUP are visible.
On Thu Mar 8 10:56:37 EST 2007
Stéphane RIFF stephane.riff at cerene.fr wrote:
I think I found a little bug in the map_query_float.php :
If there are more than one layer queryed there is an error in rendering
the second one results.
The problem come from map_query_float.php line 227 ($oResultCache =
For the first layer it works because $a is undefined but for the other
ones $a is the to numresult-1 of the first layer.
So for the second layer $oResultCache = $oLayer->getResult($a); can
The workaround I found is to replace line 227 ($oResultCache =
$oLayer->getResult($a);) in map_query_float.php by :
$oResultCache = $oLayer->getResult(0);
It seems to work for me, maybe it's a bad workaround let me know about this.
on Thu Mar 8 11:24:16 EST 2007
Lorenzo Becchi lorenzo at ominiverdi.com replied:
you are right, I had a quick look to map_query_float.php
that $a is not defined before in that code.
Middle Fork Geographic Information Services
walker at mfgis.com
More information about the ka-Map-users