[Geomoose-users] Fwd: "No results found" problem when using lat/lon shapefile

Brent Fraser bfraser at geoanalytic.com
Mon Jul 27 10:53:32 PDT 2015


Geomoosers,

  FYI, here's my solution for GeoMoose 2.7.1 when using a lat/lon 
shapefile and getting "No results found for your query".  I'll file an 
Issue for the query.php fix.

Brent Fraser


-------- Forwarded Message --------
Subject: 	Re: Firebug results
Date: 	Sun, 26 Jul 2015 21:21:41 -0600
From: 	Brent Fraser <bfraser at geoanalytic.com>
Organization: 	GeoAnalytic Inc.
To: 	Simon Gathuri <simon.gathuri at yahoo.com>



Here's what I have,

     <service name="search_parcels" title="Search" clear-highlight="true">
         <url>php/query.php</url>
         <step type="input">
             <input type="hidden" name="highlight" value="true"/>
             <input type="hidden" name="mode" value="search"/>

             <input type="hidden" name="layer0" 
value="MS_projeclatlongt/projeclatlongt"/>
             <input type="hidden" name="template0" value="itemquery"/>
                         <input type="select" name="fieldname0" 
title="Search By:">
                              <option value="PLOTNO_1">LR NO</option>
                              <option value="PAID">Status</option>
                         </input>
             <input type="hidden" name="comparitor0" value="eq-str"/>
                         <input type="user" name="value0" title=""/>
         </step>
     </service>


and a search_result.html:

<!-- MapServer Template -->
<b>PLOT NO:</b> <a data-pin="[PLOTNO_1]" id="gm-parcel-[PLOTNO_1]" 
class='sprite-control sprite-control-find-selected' style="padding-left: 
22px" parcel-shape="[shpxy precision=5]" 
href="javascript:GeoMOOSE.zoomToPointsList(dojo.byId('gm-parcel-[PLOTNO_1]').getAttribute('parcel-shape'), 
'EPSG:4326');">[PLOTNO_1]</a><br/>
<b>PLOT_NO2:</b> [PLOTNO_1]<br/>
<hr/>

And I added some code to query.php (the lines in bold):

*                    $map_projection_def = $map->getProjection();**
**                    $map_projection_obj = 
ms_newProjectionObj($map_projection_def);**
**
**if($queryLayer->getProjection() != NULL) {**
**                        $projection = $queryLayer->getProjection();**
**                    }**
**                    if($projection != NULL) {**
**                        # reproject the query shape as available.**
**                        $projection = ms_newProjectionObj($projection);**
**                    }**
**                    if($projection) {**
**$ext->project($projection, $map_projection_obj);**
**                    }**
**                    if($DEBUG) {**
**                        error_log(implode(',', 
array($ext->minx,$ext->miny,$ext->maxx,$ext->maxy)));**
**error_log("<br/>extent for query in map SRS.<br/>");**
**                    }*

                     $queryLayer->open();
                     if($DEBUG) { error_log('queryLayer opened'); }
                     $queryLayer->queryByRect($ext);
                     if($DEBUG) { error_log('queryLayer queried'); }

I could ship you an updated query.php, but I need to know which version 
of GeoMoose you are using.

Best Regards,
Brent Fraser

On 7/26/2015 9:07 PM, Simon Gathuri wrote:
> comparitor0|like-icase|comparitor1|gt|dojo.preventCache|1437966212722|fieldname0|PLOTNO_1|fieldname1|AREA|highlight|true|layer0|projeclatlongt/projeclatlongt|mode|search|operator1|or|template0|itemquery|value0|24612|value1
> Source
> |highlight=true&mode=search&layer0=projeclatlongt%2Fprojeclatlongt&template0=itemquery&fieldname0=PLOTNO_1||&comparitor0=like-icase&value0=24612&fieldname1=AREA&operator1=or&comparitor1=gt&value1=&dojo.preventCache||=143796621272| 
>
>
> ||
>
> ||
> |I request you to rewrite the search part in the mapbook you worked 
> before. I think it is easier because i may be missing something may be 
> wrong defination
> |



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150727/dcd940e1/attachment.html>


More information about the Geomoose-users mailing list