|
||||
[maplab-users] queryByPoint modificationCharlton Purvis cpurvis@asg.sc.eduMon, 8 Sep 2003 09:15:56 -0400
|
Hi, Paul: I should add that POLYGON point queries never had point query problems. I only had to do this for point-POINT queries. A horse is a horse, of course . . . Charlton > -----Original Message----- > From: Paul Spencer [mailto:pagameba@magma.ca] > Sent: Sunday, September 07, 2003 3:57 PM > To: Charlton Purvis > Cc: Maplab Users > Subject: Re: [maplab-users] queryByPoint modification > > Charlton, > > thanks for this. I will check the existing code to see what's going on > and probably incorporate your fix into an upcoming release of maplab. > > Cheers, > > Paul > > Charlton Purvis wrote: > > >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 > > > >_______________________________________________ > >Maplab-users mailing list > >Maplab-users@dmsolutions.ca > >http://lists.dmsolutions.ca/mailman/listinfo/maplab-users > > > > > > > > -- > -- > Paul Spencer > Applications and Software Development > DM Solutions Group Inc. > http://www.dmsolutions.ca >
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |