[Geoprisma-users] QueryOnClick Configuration

Louis Rocheleau-Lieutenant louis.rocheleau at boreal-is.com
Thu Nov 26 03:23:17 EST 2009


Hello,

I have started using GP recently. I am currently able to display a basic map with many layers. The next step is to be able to use the QueryOnClick widget.
I have started configuring it based on the Sample1 example on the GP website. I think I am almost there. Here is was I observe with my current configurations.

- The toolbar contains the "i" button. 
- The drop down list next to the "i" (List of queryable layers) displays the name of the two (2) resources I have set up for QueryOnClick.
- One of these resources is polygons, the other one is points.
- No matter where I click on any of these resources, I get the message "No Record Found".

Now, trying to debug it, I think the projection settings are good. The map displays well and the query returned when I use QueryOnClick refers to a plausible BBOX. 
Though looking at the query results, it seems the GML information returned by the mapfile is empty : <msGMLOutput> </msGMLOutput>

I have tried to set it up correctly in the mapfile, but it seems I don't get through.
Please does anybody have an idea ?

Thanks
-- 
Louis Rocheleau-Lieutenant

GIS & Business Analyst
Boréalis
101, Place du Moulin, bureau 202-A Magog (Qc) Canada J1X 4A1
T. +1.514.313.5951 | +1.819.575.6037 ext.1165
E. louis.rocheleau at boreal-is.com

P.S. Here are some parts of the configuration I have : (Note I'll give the information only for the polygon layer)

GP.XML
Widgets:
        <geoexttoolbar>
            <name>Toolbar</name>
            <options>
                <widgets>                    
                    <widget>QueryOnClick</widget> 
                </widgets>
            </options>
        </geoexttoolbar>

        <queryonclick>
            <name>QueryOnClick</name>
            <options>
                <displayfields>
                    <field>title</field>
                </displayfields>
                <results>
                    <result>ResultExtGrid</result>
                </results>
            </options>
        </queryonclick>
        
        <resultextgrid>
          <name>ResultExtGrid</name>
          <options>
            <inwindow>false</inwindow>
            <grids>
              <grid>
                <resourcename>Res_Surveyed_Farms</resourcename>
                <delegatecontext>
                  <enabled>true</enabled>
                  <label>Link to AkIMS</label>
                </delegatecontext>
                <displayname>Surveyed Farms</displayname>
                <fields>
                 <field>
                   <id>sfarmid</id>
                   <label>Farm ID</label>
                   <type>string</type>
                   <width>75</width>
                 </field>
                 <field>
                   <id>farmtype</id>
                   <label>Farm Type</label>
                   <type>string</type>
                   <width>75</width>
                 </field>
               </fields>
             </grid>
           </grids>
          </options>
        </resultextgrid>

Resources:
        <resource>
            <name>Res_Surveyed_Farms</name>
            <datastores>
                <datastore>DS_Surveyed_Farms</datastore>
            </datastores>            
            <widgets>
                <widget>Toolbar</widget>
                <widget>QueryOnClick</widget>
                <widget>ResultExtGrid</widget>
            </widgets>
        </resource>

Workspace:
                <resource>
                    <name>Res_Surveyed_Farms</name>
                    <widgets>            
                        <widget>Toolbar</widget>
                        <widget>QueryOnClick</widget>
                        <widget>ResultExtGrid</widget>
                    </widgets>
                </resource>


MAPFILE:

  [...]
  WEB
    TEMPLATE "map.html"
    IMAGEPATH "/Akyem/www/Akyem/carto/pmapper3/tmp/"
    IMAGEURL "/Akyem/carto/pmapper3/tmp/"
    METADATA
        "gml_include_items" "all"
    END  # Metadata
  END  #Web

  [...]

  ##################################################
  # FARMS - SURVEYED
  ##################################################
  LAYER
    NAME "Farms"
    METADATA
      "DESCRIPTION" "Surveyed Farms"
      "LAYER_ENCODING" "UTF-8"
      "gml_include_items" "all"
    END
    TYPE POLYGON
    STATUS ON
    TRANSPARENCY 55
    CONNECTION "user=[...] password=[...] dbname=[...] host=localhost port=5433"
    CONNECTIONTYPE postgis
    DATA "the_geom from (SELECT oid, fl_id, sfarmid, farmtype, acre, hectares, st_setsrid(the_geom,25000) as the_geom, 
                                date_repegged, stool, town, surveydate, bookno, evaluationdate, suv_acreage
                           FROM geo_farms) as geo_vw_farms
                         USING UNIQUE oid USING SRID=25000"
    CLASS
      TEMPLATE void
      NAME "Farms"
      COLOR 102 191 0
      OUTLINECOLOR 0 0 0
    END
  END # LAYER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geoprisma-users/attachments/20091126/619ea3dc/attachment-0001.html


More information about the Geoprisma-users mailing list