[Geomoose-users] Query Service Code for GM 1.6

Brent Fraser bfraser at geoanalytic.com
Tue Dec 15 17:15:15 EST 2009


I know the Select service will return information allowing GeoMoose to
highlight features, so perhaps the Search will too, or could be made to.

  Highlighting is actually quite complicated (to me anyways).  Have a look
for my posts of the 6 to 8 months; some are related to highlighting.

Best Regards,
Brent Fraser

> If any of you are interested I have made a multi-search in GM 1.6 using a
> service and map file expressions.
> My only issue right now is that it DOES NOT highlight the returned records
> in the map.  I don't think 1.6 was written to do this.
> But would be very interested if anyone knew how to do this!!!!!!!!!!!
> I am using the same area for the search out of the box on the search
> tab...I simply made it (with the help of others) a multiple search on one
> tab.
>
> Any questions please feel free to contact me...
>
> Demo.xml
> The QuerySearch below is the service being used.  All you have to do is
> create more input types to increase the searching attributes
> Notice in the Search service below the extra "subform title"
> Demo.html
>                 Notice the input names reflected in the Service above
> Itemquery_PID.map
>                 Notice the expression being built in the Filter using the
> input type ID value
>                                               FILTER ('[USE1_DESC]'=~
> /.*%idOwnerQueryDESC%.*/ AND
> '[BLOCK]'=~
> /.*%idOwnerQueryBLOCK%.*/)
>                 USE1_DESC and BLOCK are actual field names in the Parcels
> shapefile
> Itemquery_parcels_DESC.html
>                 Obviously at this point you just need to configure this
> file to show the data you wish for each returned record
>
>
> In the Demo.xml
>
> <service title="SearchByPID" selectable="false" default="false"
> locked="true" div="PIDsearch">
>                         <url>/cgi-bin/mapserv.exe</url>
>                         <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode" value="nquery"/>
>                         <input type="hidden" name="layer"
> value="parcels"/>
>                         <input type="user" name="idPID" title="Zoom to
> PID#:"/>
> </service>
> <service title="SearchByAddress" selectable="false" default="false"
> locked="true" div="ADDRESSsearch">
>                         <url>/cgi-bin/mapserv.exe</url>
>              <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode" value="nquery"/>
>                         <input type="hidden" name="layer"
> value="parcel_points"/>
>                         <input type="user" name="idPOINTS" title="Zoom to
> Address:"/>
> </service>
> <service title="QuerySearch" selectable="false" default="false"
> locked="true" div="QuerySearchTest">
>                         <url>/cgi-bin/mapserv.exe</url>
>                         <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode" value="nquery"/>
>                         <input type="hidden" name="layer"
> value="parcels"/>
>                         <input type="user" name="idOwnerQueryDESC"
> title="Zoom to OwnerQueryDESC#:"/>
>                         <input type="user" name="idOwnerQueryBLOCK"
> title="Zoom to OwnerQueryBLOCK#:"/>
> </service>
> <service title="Search" selectable="false" default="false" onclick="return
> false;" locked="false" type='multiform'>
>                   <subform title="SearchByPID"/>
>                     <subform title="SearchByAddress"/>
>                   <subform title="QuerySearch"/>
>   </service>
>
>
> In the Demo.html at the bottom
>
> <div id="CustomForms">
>
> <div id="PIDsearch">
>                            <font color="black"><p align="center">This
> section will allow you to search the Parcel
> Database by PID, Address, and Owner. Find the
> appropriate search criteria below and enter the
> text in the textbox and hit the Search button
> next to the textbox.</p></font>
>                         <font color="black"><b>Search for
> PID:</b></font><br/>
>                         <input name="idPID" type="text" id="idPID"
> onkeypress="return clickButton(event,'Button1')"
> />
>                         <input type="submit" id="Button1" value="Search"/>
>                         <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode" value="nquery"/>
>                         <br>&nbsp;&nbsp;&nbsp;<i>Enter PID number.<i/>
>                         </div>
> <div id="ADDRESSsearch">
>                         <font color="black"><b>Search for
> Address:</b></font><br/>
> <input name="idPOINTS" type="text" id="idPOINTS" onkeypress="return
> clickButton(event,'Button2')" />
>                         <input type="submit" id="Button2" value="Search"/>
>                         <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode"value="nquery"/>
>                         <br>&nbsp;&nbsp;&nbsp;<i>Enter Address number.<i/>
> </div>
> <div id="QuerySearchTest">
>                         <font color="black"><b><u>Search Query: Build
> Query</u></b></font><br/>
>                         <i>Description:<i/><br>
>                   <input name="idOwnerQueryDESC" type="text"
> id="idOwnerQueryDESC" onkeypress="return
> clickButton(event,'Button4')" /> <br>
>                         <i>Block:<i/><br>
> <input name="idOwnerQueryBLOCK" type="text" id="idOwnerQueryBLOCK"
> onkeypress="return clickButton(event,'Button4')" />
>                         <input type="submit" id="Button4" value="Search"/>
>                         <input type="hidden" name="map"
> value="/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/itemquery_PID.map"/>
>                         <input type="hidden" name="mode"value="nquery"/>
> </div>
> </div>
>
>
> Itemquery_PID.map file
>
>   LAYER # Parcels Owner Layer
>                             NAME 'Parcels'
>                             DATA 'parcels/parcels.shp'
>                             STATUS DEFAULT
>                             TYPE POLYGON
>                             METADATA
>                                               qstring_validation_pattern
> '.'
>                             END
>                             TEMPLATE 'parcels/itemquery_parcels_DESC.html'
>
>                             FILTER ('[USE1_DESC]'=~
> /.*%idOwnerQueryDESC%.*/ AND '[BLOCK]'=~
> /.*%idOwnerQueryBLOCK%.*/)
>  END
>
> Itemquery_parcels_DESC.html file
>
> Configure this anyway you see fit.
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>
>






More information about the Geomoose-users mailing list