![]() |
||||
|
|
||||
[maplab-users] queryByPoint modificationCharlton Purvis cpurvis@asg.sc.eduFri, 5 Sep 2003 16:36:33 -0400
|
||||
Hi, folks:
I couldn't get point queries to do what I wanted. As a matter of fact,
I couldn't get them to do anything right off-the-bat. So I made the
following changes, and all is great.
Problem was, on a single click, the first part of the if/then block that
decides to execute a point or a rect query, only checks to see if
$adMax[0 and 1] are numeric. That seems to be true in all cases, so I
added a check to see if they were identical to $adMin[0 and 1]. If so,
a single point has been clicked. Otherwise, they've made a rectangle.
./wrapper/drawmap.php
* changed the if/then block under // execute query (line 402) to be:
if ( ( is_numeric( $adMax[0] ) && is_numeric( $adMax[1] ) ) &&
( $adMax[0] != $adMin[0] && $adMax[1] != $adMin[1] ) ) {
$oResultSet = $oMapQuery->executeRectQuery( $adMin[0],
$adMin[1],$adMax[0], $adMax[1] );
}
else {
$oResultSet = $oMapQuery->executePointQuery( $adMin[0],
$adMin[1] );
}
./query.phtml
* changed the if/then block under // execute query (line 124) to be:
if ( ( is_numeric( $adMax[0] ) && is_numeric( $adMax[1] ) ) &&
( $adMax[0] != $adMin[0] && $adMax[1] != $adMin[1] ) ) {
$oResultSet = $oMapQuery->executeRectQuery( $adMin[0],
$adMin[1],$adMax[0], $adMax[1] );
}
else {
$oResultSet = $oMapQuery->executePointQuery( $adMin[0],
$adMin[1] );
}
Maybe I had to do this because of my browser? I didn't go back to
quintuple-y check the origins of $adMin and $adMax, but the above
solution works for me.
Charlton
Charlton Purvis
(803) 777-8858 : voice
(803) 777-8833 : fax
cpurvis@sc.edu
Advanced Solutions Group
Department of Physics and Astronomy
University of South Carolina
Columbia, SC 29208
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |