What's new in 3.0

This topic provides an introduction to the updates and enhancements in version 3.0, changes between 3.0 and the previous released ArcGIS API for Silverlight version 2.4, issues resolved between the 2.4 release and the 3.0 release, and a list of items removed from the API.

ArcGIS 10.1 for Server is required to utilize much of the new functionality included with 3.0. This functionality includes dynamic layers, generating classification definitions, enhanced query options, tracking layer edits, applying ownership based access, uploading, and generating printable output.

Updates and enhancements

The following updates and enhancements are included in 3.0:

Silverlight 4 and 5 supported

The ArcGIS API for Silverlight includes two sets of assemblies, one targets the Silverlight 4 platform and the other the Silverlight 5 platform. Silverlight 5 introduces significant improvements in network and graphics performance, interactive debugging for data binding, an enhanced "trusted application" model that supports p/invoke, and postscript vector printing. However, many development and deployment environments still require Silverlight 4. To provide the most flexible and ideal solution, support for both platforms is included with the product.

Project templates included for Silverlight 4 and 5

Standard and Showcase templates for Visual Studio 2010 and Expression Blend Preview for Silverlight 5 have been added. Note, templates for Silverlight 4 are still included with the product.

Change layer rendering, layer order, or add layers on the fly in map services

ArcGIS Server dynamic map services now support the ability to change the rendering and order of layers on the fly. The Dynamic Layers parameter on a map service must be enabled to change layer order and symbology. In addition, layers from versioned and non-versioned geodatabases, shapefiles, tables, and rasters can be added on the fly. A workspace must be registered with the map service for specific types of data and the ArcGIS Server user or connection user must have access to the workspace location.

With ArcGISDynamicMapServiceLayer, use LayerDrawingOptions to override the renderer for a layer in the map service. Use DynamicLayerInfos to change layer order or add layers on the fly.

For examples of this functionality, see the Dynamic Layers in Code and Dynamic Layers in XAML samples.

Generate renderers on the server for layers in map services

Feature layers in ArcGIS Server map services have a new operation, GenerateRenderer, that enables users to create class breaks and unique value renderers. Input parameters include the classification field, method, breaks, normalization field and type, and the color ramp. This enables users to effectively create classifications for large amounts of data without returning all data to the client.

Use the GenerateRendererTask to return a class breaks or unique value renderer. In many cases, this renderer is used to override the renderer for a layer in a dynamic map service.

For an example of this functionality, see the Generate Renderer sample.

Use enhanced query options to order results and generate statistics

The Query operation for feature layers in a map service now provides the ability to order results by a field and generate statistics for fields. This capability requires that the feature layer be stored and managed within an enterprise geodatabase.

Use the OrderByFields property with a Query in a QueryTask to order results. Create a list of OutStatistic instances and define the group fields using the GroupByFieldsForStatistics property to generate statistics for one or more fields in a layer or table.

For examples of this functionality, see the Query with Order By Field and Statistics samples.

Track user identity for edits to a layer in a feature service

The identity of users who make edits (adds, updates) to feature classes in an enterprise geodatabase can now be tracked. Enabling identity and edit tracking on a feature class requires extra fields to maintain the creator and editor user, and the date created and edited. When the feature class is hosted as an editable feature layer within an ArcGIS Server feature service, the identity of the creator\editor should be established to accurately track edits. Token-based authentication methods can provide an authenticated user, which is passed to the geodatabase and inserted into the respective creator or editor user field. If no authenticated user is provided, and anonymous access is enabled on the feature service, the creator and editor fields are left set to "null." Ownership-based access can be enabled on a feature service to limit the ability of users to update or delete features they did not create.

For an example of this functionality, see the Editor Tracking sample.

Generate printable output using the new PrintTask

The API includes a new assembly, ESRI.ArcGIS.Client.Printing.dll, which contains the PrintTask and other classes that support working with the new ExportWebMap server task in ArcGIS 10.1 for Server. The server task can be configured with custom layout templates (one is provided that shows the map only) and provides a set of output types, such as PDF, PNG, and SVG. The ExportWebMap server task accepts a web map to define display content and symbology. ArcGIS dynamic map service layers (with dynamic layers), tiled map service layers, image service layers, Bing tile layers, feature layers, graphics layers, KML layers, OpenStreetMap layers, WMS layers, group layers, and selection sets are supported. Additional map and layout options enable you to rotate map contents, display data within a time extent, and define legend options.

For an example of this functionality, see the Printing sample.

Support for geometry with Z and M values

ArcGIS Server 10.1 REST services support the use of geometry with Z and M values. As a result, client-side geometries (for example, points, lines, polygons, and envelopes) now contain vertices with Z and M values. By default, both are set to NaN. You can determine if a feature layer has Z and M values using the FeatureLayerInfo properties HasZ and HasM, respectively. Use FeatureLayerInfo.EnableZDefaults to determine if a default Z value has been set, and FeatureLayerInfo.ZDefault to get the default Z value. Use the HasZ and HasM properties on the geometries to interrogate MultiPoint, Polyline, and Polygon geometries. Use the ZMin, ZMax, MMin, and MMax properties on an Envelope. For a FeatureLayer or Task, set the ReturnZ and ReturnM properties of their respective classes to return geometry with Z and M values.

Support for new image service functionality

ArcGIS Server 10.1 image services have been enhanced to support new capabilities such as measuring height, distance, and direction in two and three dimensions (mensuration), computing histograms, and editing content by adding, updating, and deleting rasters, and editor tracking.

WebMap library replaced by new ArcGIS Portal library

In previous versions of the API, the ESRI.ArcGIS.Client.WebMap library enabled developers to access webmap details and data to create an populate layers in a Map. This library has been been replaced with a new library, ESRI.ArcGIS.Client.Portal, which supports working with the ArcGIS Portal API to search, discover, and use portal content more effectively. The library can be used with ArcGIS Online and the latest version of Portal for ArcGIS, both of which support the ArcGIS Portal API. Use the Portal library connect to a portal, discover properties of a portal, search for content such as webmaps, and create a Map control from a webmap. The Portal library also contains a webmap class and object model that represents the structure of a webmap on the client. Use this class to construct or interrogate a webmap natively.

The following code sample shows one technique for returning featured webmap items on the ArcGIS Online portal. The total count of items and the title of each webmap item is also returned.

ArcGISPortal arcgisportal = new ArcGISPortal();

arcgisportal.InitializeAsync("http://www.arcgis.com/sharing/rest", (portal, ex1) =>
{
    portal.ArcGISPortalInfo.SearchFeaturedItemsAsync(new SearchParameters()
    {
        QueryString = "type:\"Web Map\" AND NOT type:\"Web Mapping Application\"",
    },
        (searchResultInfos, ex2) =>
        {
            int totalResultCount = searchResultInfos.TotalCount;

            foreach (ArcGISPortalItem portalItem in searchResultInfos.Results)
            {
                string webmapTitle = portalItem.Title;
            }
        });
});

Use IdentityManager to access token secured services, portals, and web maps

Secured services in ArcGIS Server often utilize token-based security. Portals, such as ArcGIS Online, require tokens to access secure content such as web maps and services. In both cases, IdentityManager makes it easier to manage access to token-secured content. Add a single instance of IdentityManager to your application, wire up the challenge delegate, and, when a challenge occurs (that is, when a token is required), provide a username and password to generate credentials and proceed. Web requests made by layers, tasks, and web maps can trigger a challenge.

The SignInDialog control in the Toolkit provides an out-of-the-box user experience for entering credentials. For an example, see the SignInDialog sample.

Token-secured services hosted by ArcGIS Server 10.0 SP1 and later are supported.

NoteNote:

Secure content in an application is handled synchronously, so a challenge must be resolved for one resource before proceeding to the next.

The following code shows an example of activating the IdentityManager, setting the challenge delegate, generating credentials, and passing the credentials to a callback handler:

public IdentityManagerSimple()
{
    InitializeComponent();
    // Activate identity manager.
    IdentityManager.Current.ChallengeMethod = Challenge;
}

private void Challenge(string url,
            System.Action<IdentityManager.Credential, Exception> callback, 
												IdentityManager.GenerateTokenOptions options)
{
    // Pop-up dialog box to enter credentials - user action to call GenerateCredentialAsync 
    IdentityManager.Current.GenerateCredentialAsync(url, "user1", "pwd1",
        (credential, ex) =>
        {
            callback(credential, ex);
        }, 
        options);
}

For another example of this functionality, see the Identity Manager - Services sample.

Better placement options for map tips and the InfoWindow control

Map tips on graphics and feature layers can be placed more effectively to encourage display of attribute content. Set the new GraphicsLayer.MapTipAutoPosition attached property to true on the root element within a MapTip element to enable automatic placement and display of map tip popup content within the Map control.

<esri:GraphicsLayer.MapTip>
                   <Border esri:GraphicsLayer.MapTipAutoPosition="True"

The location of the InfoWindow control can also be placed more effectively and explicitly. Set the Placement property to "Auto" to keep the info window within the map control or define a specific location relative to the info window's anchor point. The location of the sprite (or tail) will accomodate for the location of the info window.

<esri:InfoWindow Placement="Auto"

Additional enhancements

The following are additional enhancements in 3.0:

  • Query and edit support for versioned layers in a geodatabase. For ArcGIS dynamic map services, dynamic layers also support using a specific geodatabase version.
  • Support for feature service enhancements, such as defining a realm for editor tracking, or limiting interactivity with features based on more granular service capabilities (add, update, delete).
  • Support for network analyst service enhancements such as the ability to use inputs from a query url, geometry with M and Z values, compressed geometry, and the use of time parameters for operations.
  • Support for geocode service enhancements such as batch geocoding, search extents, and composite locator details.
  • Support for geometry service enhancements such as calculation types on area and length measurements, geodesic buffering, and reprojection with datum transformation.
  • Support for geoprocessing enhancements such as item uploads, returning record set fields, GPMultiValue support for all types, and the cancel operation.
  • Graphics layers include a new ClearSelection method.
  • Editor includes an UndoEdits command.
  • The maximum height and width of a FeatureDataForm from the EditorWidget can be set explicitly.
  • Support for the new uploads operation available with a number of service types including image, feature, and geoprocessing. The UploadTask enables you to upload and register files for use on the server.
  • Support for additional languages: Dutch, Polish, Swedish, Norwegian, and Romanian

Complete list of changes

For a complete list of changes in the API between versions 2.4 and 3.0, see the following assembly comparisons:

Resolved issues

The following issues are resolved with the ArcGIS API for Silverlight 3.0 release:

Removed items

The following classes and members were deprecated in version 2.3 and have been removed in version 3.0 of the API.

Classes

  • DictionaryConverter
  • ScaleBar
  • SelectedToolbarItemArgs
  • Toolbar
  • ToolbarItem
  • ToolbarItemCollection

Members

  • ArcGISImageServiceLayer.InitialExtent
  • ArcGISImageServiceLayer.MapName
  • ArcGISImageServiceLayer.MinPixelSize
  • ArcGISImageServiceLayer.MaxPixelSize
  • ClassBreaksRenderer.Attribute
  • CodedValueSource.Name
  • FeatureLayer.FeatureSymbol
  • FeatureLayer.Color
  • FeatureDataGrid.RefreshRow(Graphic graphic)
  • FindParameters.SpatialReferenceWKID
  • IdentifyParameters.SpatialReferenceWKID
  • LinearUnit.ScaleBarUnit
  • Magnifier.Initialize(ESRI.ArcGIS.Client.Map map)
  • Query.SpatialReferenceWKID
  • Toolbar.ToolbarIndexChangedHandler(object sender, SelectedToolbarItemArgs e)
  • Toolbar.ToolbarItemMouseEnter(object sender, SelectedToolbarItemArgs e)
  • Toolbar.ToolbarItemMouseLeave(object sender, SelectedToolbarItemArgs e)
  • UniqueValueMultipleFieldsRenderer.Attributes
  • UniqueValueRenderer.Attribute
9/12/2012