Welcome Guest, you are in: Login

FDOT Wiki

RSS RSS

GisFramework



Search the wiki
»

Query Widget

RSS
Modified on Wednesday, 04 May 2016 09:10 AM by Administrator Categorized as Uncategorized
Allows developers to build commonly used queries within the QueryWidget.xml configuration file so the end user enters only one component into the query field to return results of everything found in a separate map service built specifically for this tool (D4 names this service “D4Search”).

The Query Widget uses a “Search” Map Service of non-displayed layers to search based on pre-defined queries as configured in the Widget’s .config file & display those features returned in the search.

Example of a predefined query would be a query for an “Active Work Program” by FM #, or partial FM # followed by the wildcard “%”. The user would select this query from a list, enter the FM# & the query returns any active work program vector with that FM#. The query widget allows for parsing the FM # to PSEE & launching PSEE by adding the following 3 tag lines to the same .xml file as shown in the following example:

(http://fdotwp2.dot.state.fl.us/ProjectSuiteEnterpriseEdition/pages/project/project.aspx? displayProjectSuite="true" projectSuiteLinkField="ITEM_SEG").

Identify All


Table of Contents [Hide/Show]


Instructions

1. To use the "Query" widget you must copy and the FDOT.GIS.Framework.Atkins.xap into the ClientBin folder that is used by the application.

2. You need to add the following lines into the “components.config" file that is used by the application:

<component name="Query Widget"
             type="FDOT.GIS.Framework.Atkins.ViewModels.QueryWidgetViewModel, FDOT.GIS.Framework.Atkins, Version=1.0.0.0"
             xapuri="FDOT.GIS.Framework.Atkins.xap"
             helpText="Run pre-configured queries on a selected map layer">
  </component>

3. You also need to add the following lines into the “startup.config" file that is used by the application:

<startupAction name="LoadResourcesStartupAction"
                 type="FDOT.GIS.Framework.Atkins.StartupActions.LoadResourcesStartupAction"
                 xapuri="FDOT.GIS.Framework.Atkins.xap">
    <customSettings>
      <add name="ApplicationResources"
           value="SymbolResources" />
    </customSettings>
  </startupAction>

4. Create new file in the config directory with the name QueryWidget.xml. Follow example between Layer tags.

<?xml version="1.0" encoding="utf-8" ?>
<WidgetConfig>
  <ProjectSuiteUrl>http://fdotwp2.dot.state.fl.us/ProjectSuiteEnterpriseEdition/pages/project/project.aspx?</ProjectSuiteUrl>
  <QueryLayers>

    <Layer title="Active Work Program"
           displayProjectSuite="true"
           projectSuiteLinkField="ITEM_SEG"
           restURL="D4Search|2">
      <QueryFields>ITEM_SEG</QueryFields>
      <TextSearchLabel>Search by FM Number [Example: 427937.1 or partial value followed by %]  </TextSearchLabel>
      <OutputFields>*</OutputFields>
      <MapTipTemplate>Title=Work Program;Content=FM number: {#ITEM_SEG}</MapTipTemplate>
    </Layer>

    <Layer title="CITY"
           restURL="D4Search|5">
      <QueryFields>CITY</QueryFields>
      <TextSearchLabel>Search by City [Example: Plantation or partial value followed by %]  </TextSearchLabel>
      <OutputFields>*</OutputFields>
      <MapTipTemplate>Title=CITY;Content=CITY: {#CITY}</MapTipTemplate>
    </Layer>

  </QueryLayers>
</WidgetConfig>

Downloads

FDOT.GIS.Framework.Atkins.xap Download
Any Questions or Comments? Email
Some of the icons created by FamFamFam.