Skip to content

Search Widget for Silverlight

Marten Hogeweg edited this page Dec 14, 2012 · 1 revision

The Geoportal Search Widget for Silverlight allows users to search other geoportals from within a Silverlight Viewer.

The ArcGIS API for Microsoft Silverlight/WPF allows for the creation of Rich Internet applications on top of ArcGIS Server. The API is built on the free Microsoft Silverlight framework. Esri provides sample viewer templates that can be integrated with the geoportal using the Geoportal Search Widget for Silverlight. This topic will address #How to Add the Geoportal Widget to an Existing Silverlight Viewer, and #How to Use the Geoportal Search Widget for Silverlight once it is added.

Table of Contents

How to Add the Geoportal Widget to an Existing Silverlight Viewer

If you would like to add the Geoportal Search Widget to a Silverlight Viewer application, follow the steps below.

  • Verify that you have the required tools for project compilation and testing:
  • Download and compile the source code for the Geoportal Search Widget for Silverlight.
  • Download Silverlight Version 4 from Microsoft and install it, and download ArcGIS API for Microsoft Silverlight/WPF version 2.0 from the Esri resource center and install it.
  • Download Esri ArcGIS Sample for WMS Data Source source code from the Esri code gallery and unzip it to a directory.
  • Copy the GeoportalWidget folders into the parent directory of the above unzipped resource.
  • Create a solution using Visual Studio 2010.
  • Create two class library projects in the solution. These two projects correspond to two folders created in fourth and fifth steps above. Add the corresponding c sharp files into these two projects.
  • Add references to WMS project in the GeoportalWidget project.
  • Compile the solution to generate GeoportalWidget.dll assembly. This component can be used in other Silverlight applications.
  • Test the Geoportal Search Widget for Silverlight integration using the information below on how to use the tool.

How to Use the Geoportal Search Widget for Silverlight

When the Geoportal Search Widget for Silverlight is properly integrated into your Silverlight Viewer, you should be able to launch a Find Data widget from the interface. This Find Data window is the Geoportal Search Widget for Silverlight. To launch it, hover your mouse pointer over the cube Tools icon in the viewer's main menu, and you will see the Find Data tool displayed in the list of available tools. Click on it to launch the Find Data user interface.

How to search for resources

Notice that the Find GIS Data window has one input field, a Search button, and three radio buttons. The input field accepts any lucene search query. You can type in a simple query, such as just one keyword to search, or you can develop more complex queries (see Using Lucene Search Text Queries). Furthermore, you can limit search results to a certain spatial extent. Select the appropriate radio button: Anywhere means no spatial filter will be applied, Intersecting will retrieve records that overlap the spatial extent currently shown in the Silverlight Viewer, and Fully Within will retrieve records where the spatial extent falls fully within the extent currently shown in the Silverlight Viewer.

Once you have entered the search criteria, click the Search button.

Search results matching your criteria are returned. Click on one of the records, and the interface zooms to the spatial extent of the resource. Another window appears, showing information for that search result resource and links that provide the same functionality that you'd see on the geoportal search page. You will notice that an Add to Map link appears for Live Data resources. That is because in this Silverlight application, users can preview the service when they chose to add it to the map with the Add to Map link.

Other tools in the Find Data window

The Silverlight widget allows you to turn off the bounding box extents for all records or individual records. Beside each search result title is a check box, by default it will be checked which means the bounding box for that record will be displayed on the map. You can uncheck the box and the bounding box will not display on the map. You could also check uncheck the box beside the number of documents found to remove all search result bounding boxes from the map.

If you close the window, but want to open it again, hover the pointer over the cube "Globe" icon in the viewer's main menu, and you will see the Find GIS Data tool display. Click on it to restore it to the Find GIS Data user interface.

Viewing a service in the interface

The Silverlight Viewer should support adding a variety of web services to the map, including ArcIMS, ArcGIS Server REST services, OGC WMS, and GeoRSS. If a service is not running or is of an unsupported service type, it will not appear on the map interface even though an Add to Map link is displayed with the search result.

How to navigate the Silverlight Viewer map

Documentation for how to use the Silverlight Viewer is specific to its implementing organization, and will be defined in the Silverlight Viewer's help by the organization hosting the viewer.


Back to Geoportal Clients for ArcGIS
Clone this wiki locally