Zooming to task results automatically

In this post, Tom Brenneman and Rex Hansen share a control they created that allows you to automatically zoom to the results of a .Net Web ADF task.

Magnifying glassThis control, called ZoomToResults, enables you to automatically zoom to the result set returned from a task instead of requiring you to navigate through tree-view results in a standard TaskResults control. By default, this control is not visible at runtime. It is designed to simply zoom to the result set in the map if the number of features returned is less than the MaxResultsForMapZoom property. You will need to add this control to a task’s TaskResultsContainers collection to take advantage of these features. Note that this control must be listed before any other container in the collection (e.g. an out-of-the-box TaskResults control). This control was built with version 9.2, Service Pack 3 of the .Net Web ADF.

Follow these steps to use the control in your application.

  1. In Visual Studio, right click in the Toolbox and click Choose Items.
  2. Click Browse and navigate to ZoomToResults.dll and click OK.
  3. Drag the ZoomToResults control onto your web page.
  4. Set the following properties for ZoomToResults control:

    MaxResultsForAutoSelect – this is the maximum result set that will be selected. The results will only be selected if a result set contains this value or less. Set this property to 0 to disable the auto selection capability.

    MaxResultsForMapZoom – this is the maximum result set that will be zoomed to. The map will only be zoomed to the result set if it is less than or equal to this value. Set this property to 0 to disable the auto zoom capability.

    MinWidthOfZoom – this is the minimum width (or height actually) in map units of the extent rectangle that will be zoomed to. This is particularly useful if the result set is a single point or a very small feature. In this case you could set the minimum extent that the map will zoom to. If you are working with geographic data you may want to make this significantly smaller than the default of 10.

    ZoomExtentExpansionPercent – this is the expansion percentage around the extent of the result set for the map to zoom to. This is useful for defining a margin around the extent of features returned in a result set.

    DisplayTaskResult – display task results like an out-of-the-box TaskResults control. By default, this property is false.

    ShowTaskActivityIndicator – display activity indicator when a task is processing, like an out-of-the-box TaskResults control. By default, this property is false.

  5. To associate this container with a task, at design-time in design view click on the smart tag on the task and select Choose Task Results container.
  6. Click Add. Set the Name property of the new BuddyControl to the name of the ZoomToResult control (e.g. ZoomtoResults1).
  7. In the BuddyControl Collection Editor click the up arrow to move the ZoomToResults buddy control to the top of the list.
  8. Click OK to dismiss the BuddyControl Collection Editor.
  9. Try out the app!

Download the 9.2 control (The compressed folder contains the code with extensive comments from Tom and Rex, as well as a Readme file with the above instructions.)

Updated download for ArcGIS Server 9.3

Download the 9.3 control

Posted in Services | Tagged , , , | 28 Comments

Displaying coincident points

By Charlie Frye, Esri Chief Cartographer

We’ve had a number of folks writing in on Ask a Cartographer wondering how to displace or offset coincident points so all the points could be seen. Data with coincident points is most commonly produced as a result of geocoding addresses. There are at least two ways to handle displaying this data.  One would be to create a graduated or proportional symbol thematic map, and to do that the input point data would be processed with the Collect Events tool, which would produce output containing points that represented the locations and an attribute that indicated how many points were at that location. Continue reading

Posted in Mapping | Tagged , | 4 Comments

Business Analyst Online Task Available for Explorer

When you add the Business Analyst Online Reports Task inside ArcGIS Explorer, you gain access to a wealth of demographics and other information for any location or area in the United States.  This Task tells you what satellite imagery cannot:  how many people, houses and businesses are in your area of interest.  Several free reports are included in the Task to give you easy access to Census 2000 demographic information.  If you have an ArcWeb Services account, you can run additional reports, based on current year estimates and five-year projections for population and households.

Business Analyst Online combines GIS technology with extensive demographic, consumer, housing, and business data to deliver more than 70 presentation-quality reports and maps via your Web browser. ESRI hosts and updates the data annually to ensure wide access to the most current and accurate demographic data.

Business Analyst Online provides reports and maps to help you understand the people in your area as well as their lifestyle and buying behaviors.  Other reports focus on the local housing and businesses in the area.  Whether you are looking for suitable sites for your business expansion, or looking to attract new businesses to the area, Business Analyst Online content within ArcGIS Explorer helps create a compelling story.

Posted in Uncategorized | Leave a comment

Gulf of St. Lawrence locator map is available

By Charlie Frye, Esri Chief Cartographer

The Gulf of St. Lawrence map was originally created for an Esri tutorial on how to publish a map to ArcReader.  The intent was to include a simple locator map with a few basic functions.  These cartographic effects and tasks are highlighted:

Posted in Mapping | Tagged , , | Leave a comment

New online tutorial: Creating a Web editing application

Our team recently added a new tutorial to the Web-based help: Creating a Web Editing Application. It’s designed to help you set up a Web application for editing data, and uses the out-of-the-box Editing Task that comes with ArcGIS Server. Along the way, the tutorial discusses:

  • How to configure an instance of Workgroup ArcSDE for Web editing
  • How to design a map document that will be used in a Web editing application
  • How to publish your map to ArcGIS Server
  • How to create a Web application with the Editing Task
  • How to use the application

Did this tutorial help you? Leave us a comment about your experience.

Posted in Services | Tagged , , , | 5 Comments

Explorer and OpenGL in Action

In an earlier post we talked about some of the new SDK features in the latest release (Build 410). In that post we mentioned the addition of OpenGL support and included a screenshot showing wind vectors implemented using OpenGL in Explorer. Here’s a link to a YouTube movie showing that in action.


Posted in Uncategorized | Tagged , , , , | Leave a comment

Addendum To Setting Up Your Home Server

In an earlier post we talked a little about how you can set up your own home server for ArcGIS Explorer.

The updated e2config.xml file and skins file for the latest release (Build 410) can be found here:


Posted in Uncategorized | Leave a comment

Setting Up Your Own Home Server

One of the unique features of ArcGIS Explorer is that you can easily set up your own Explorer home server, and can control everything from the startup banner, the default map, the appearance of the navigator, whether users can add new layers, save a map, add tasks, and much more. This allows you to customize Explorer for your target audience, or tune it for a specific workflow.

This is covered in the ArcGIS Server Help, since many users that implement this would also be using ArcGIS Server to publish their own maps and tasks. But a nice feature about this capability is that it doesn’t require ArcGIS Server, or any other ESRI software for that matter. All you need to do is edit two XML files – a configuration file and a skins file – and put them in your wwwroot directory as described in the Help. Then simply point Explorer to your home server instead of the default ESRI home server. These XML files are automatically read by Explorer from its designated home server at startup, and provide you the capabilities to control a wide variety of user options and the look and feel of the application.


Posted in Uncategorized | Tagged , , , | Leave a comment


By Charlie Frye, Esri Chief Cartographer

At the Esri User Conference this year we showed, in our technical session on lessons learned in cartographic data modeling, a tool we’ve been using for a few years now.  It’s called ScaleMaster, and we initially developed it to examine the idea that different kinds of geographic data (roads, lakes, rivers, contour lines, etc.) have differing levels of sensitivity to map scale change.  The “we”, in this case, was a collaboration between Dr. Cindy Brewer of The Pennsylvania State University, Dr. Barbara “babs” Buttenfield of the University of Colorado at Boulder, and ESRI.  ScaleMaster worked well to confirm our suspicions, and we also saw some additional utility in expanding ScaleMaster a bit. Continue reading

Posted in Mapping | Tagged , | Leave a comment

New Explorer SDK Enhancements (Build 410)

(submitted by Rob Dunfey, ArcGIS Explorer SDK Development Team)

The latest release of ArcGIS Explorer includes a host of enhancements to the API, creating new opportunities for custom task developers.  The custom task framework genuinely differentiates ArcGIS Explorer from other virtual globes, allowing users to plug in custom functionality directly into the main application.

The most notable of the API enhancements are changes to the View3D class. This class controls the main viewing window in ArcGIS Explorer (the window which displays the globe).  New methods and events on the View3D class now allow developers to render OpenGL graphics on top of the view. In the example below, we’ve drawn wind vectors using OpenGL.

If you step back and think about this, it really is a quite powerful feature. What you choose to draw to the globe is now only limited by your imagination. A new developer sample in the SDK illustrates how you can use these new methods and events to draw grid lines and symbols on top of the globe, but perhaps you will choose to render a Second Life avatar?  More usefully, you may want to display a unique watermark on top of the globe when viewing a particular layer, or incorporate the output from other specialist modelling software.

Other changes to the View3D class include a new property that enables your custom task to alter the vertical exaggeration of the globe surface, and a FlyPolyline method that will allow you to fly along a polyline. This is similar to the functionality available in the application when you right-click a result from the Get Driving Directions task.

We’ve also added methods and properties to the View and Layer classes to give developers greater control over the caching of layers.  Now when you add layers to ArcGIS Explorer with a custom task, you can use the new CacheType layer property to determine how ArcGIS Explorer caches the layer, just like when you add layers via the ArcGIS Explorer user interface. 

In addition, the new RemoveLayerCache method on the View class allows your custom task to delete a layer cache.  Using these new members in combination as a developer, you have far greater control of layer caching, and can ensure layers representing dynamic data sources remain current.

New methods and properties have also been added to the API to help developers work with results.  For example, the new AutoZoom property on the TaskContext will automatically zoom the observer to the location of any new results that are passed to the task context. Using this, and adding just a single line of code should make for more user friendly custom tasks. 

The new SetZoomPerspective on the Result class lets the custom task developer define the location from which a particular result should be viewed when zoomed to in the application. Again, this should make for more user friendly custom tasks.

We’ve also fixed a bug with the LocalLayer class so that it can be used to represent kml files stored on a web server. Previously it didn’t recognize the http prefix which meant this wasn’t possible.  Perhaps you want to build a custom task that searches the web for KML files and displays the KML files it finds in ArcGIS Explorer?  With this fix, now you can.

And finally, a number of constructor overloads have been added to the API which should make for less lines of code.

Posted in Uncategorized | Tagged , , , | Leave a comment