Welcome to ESRI Blogs

Same blog, new name

Today we shortened the title of this blog to “ArcGIS Server Blog”. We removed “Development” from the name because the blog has come to include many topics of interest to non-developers.

You won’t notice any change in subject matter on this blog. It is still written by the ArcGIS Server software development team and will still contain many developer-oriented posts.

We’d like to thank you for reading the blog and for participating through your comments and e-mails.

The ArcGIS Server Software Development Team

Posted by sterlingdq | 0 Comments

Live training seminar to demonstrate map caching strategies

During the past several weeks I've been working with Danielle Hopkins of ESRI Educational Services to prepare a live training seminar on ArcGIS Server map caching. The seminar is free and will be broadcast three times this Thursday, August 28 or you can watch it later in the seminar archives. This page has more information about how and when you can tune in to the seminar.

We prepared this seminar with two main goals in mind. First, we wanted to focus on caching strategies. The seminar will explain what map caching is and how to do it, but that is really just the beginning of successful caching. There are many things to think about when you create a cache, including how to design your map, how to choose a tiling scheme, where to create tiles, how to update the tiles, and so on. In this seminar, we'll show some best practices and how to implement them using, in many cases, new features available at ArcGIS Server 9.3. Hopefully you'll learn something new even if you've been caching for a while.

Second, we wanted to teach caching by showing it, so the presentation will include four demonstrations that might be similar to caching scenarios that you face. We'll show how to create a base map cache, how to create an overlay cache that gets updated nightly, how to create a partial cache that gets filled in on demand, and how to create a cache for a Web mashup. At multiple points throughout the presentation, we'll pause to take questions that you submit.

We look forward to seeing you on Thursday!

Contributed by Sterling Quinn of the ArcGIS Server software development team

Posted by sterlingdq | 3 Comments
Filed under: , , ,

Silverlight and Web ADF integration

Working with Silverlight and the ArcGIS Server Web ADF for Microsoft .NET

Microsoft Silverlight delivers the next generation of .NET based media experiences and rich interactive applications for the Web. In this article we will discuss how to augment the user experience of your existing ArcGIS Server .NET Web ADF applications by embedding Silverlight UI components. We will also discuss how you can add GIS capabilities to any Silverlight based site by integrating it with the .NET Web ADF components.

Silverlight 2 allows for a number of features, including but not limited to:

  • Calling .NET code from JavaScript
  • Calling JavaScript functions from .NET code
  • Manipulating the XAML render tree using JavaScript

In this post you’ll explore each of these features, and the classes within the System.Windows.Browser namespace that empower this functionality.

Try it live

Download the full project including test Web site

You need to install the following applications and components to work with the solution provided in this post:

Exposing .NET Functions to the Browser

Within the project directory you will find a .NET solution named ADFinSL. Open the solution using Visual Studio 2008 and run it. You will see a screen like what is shown in Figure 1. The list at the top left is a Silverlight object. Underneath it are three HTML Input controls (buttons) and to the right is a Web ADF Map control. Pressing a button will update the Silverlight content with cities in the selected country.

Running the project

Figure 1. Running the Project

Understanding the Silverlight .NET Code and XAML

The Silverlight content in Figure 1 uses XAML (in Page.xaml) to define a ListBox item template which contains TextBlocks bound to the name of a city and latitude and longitude values.

<ListBox x:Name="_cities" Cursor="Hand" SelectionChanged="_cities_SelectionChanged">
   <ListBox.ItemTemplate>
      <DataTemplate>
      	  <StackPanel x:Name="mySP" Orientation="Horizontal">
             <Image Source="pin.png"></Image>
             <TextBlock x:Name="textBlock1"
                	Foreground="Black" Cursor="Hand"
                	FontSize="14" Height="25" 
                    Text="{Binding CityName}"></TextBlock>
             <TextBlock Height="0" Text="{Binding Latitude}"></TextBlock>
             <TextBlock Height="0" Text="{Binding Longitude}"></TextBlock>
          </StackPanel>
      </DataTemplate>
   </ListBox.ItemTemplate>
</ListBox>

Note: The Latitude and Longitude values are hidden by specifying the height=0.

The Code-Behind contains a Class that is used to represent Cities, and contains a member element named CityName.

public class CityData
{
      public string CityName { get; set; }
      public double Latitude{ get;set; }
      public double Longitude{ get;set; }

      public CityData(string cityName, double nLatitude, double nLongitude)
      {
      	CityName = cityName;
            Latitude = nLatitude;
            Longitude = nLongitude;
      }
}

The _getCities member function will return a List<CityData> containing several cities for a given country. Note: This is hardcoded for demo purposes.

Here’s an example of adding city data for the ‘United Kingdom’.

switch (country)
{
  case "United Kingdom":
  {
    ret.Add(new CityData("London", 51.5, 0));
    ret.Add(new CityData("Stratford-Upon-Avon", 52.3, -1.71));
    ret.Add(new CityData("Edinburgh", 55.95, -3.16));
    break;
  }
. . .

To bind these results to the ListBox, we simply build the List<CityData> and set it to the ItemsSource property of the ListBox. (‘_cities’ is the name of the ListBox)

public void UpdateCities(string country)
{
  	List<CityData> myCities = _getCities(country);
  	_cities.ItemsSource = myCities;
         . . .

This function is available to .NET code, but how do we expose it to the browser?

Exposing a .NET method to JavaScript

To expose your .NET code to the browser, you will need to:

  1. Reference System.Windows.Browser in your code behind.
  2. Add a Loaded event handler to your page. You can add this in the Page() constructor.
  3. Implement the Page_Loaded event handler, and use it to register your Silverlight control as a scriptable object. In this case we registered the scriptable object (not to be confused with the Silverlight object itself) as MySilverlightObject

The code looks like:

public Page()
{
      InitializeComponent();
      this.Loaded += new RoutedEventHandler(Page_Loaded);
      upDateCities("United Kingdom");
}

void Page_Loaded(object sender, RoutedEventArgs e)
{
      HtmlPage.RegisterScriptableObject("MySilverlightObject", this);
}

Once you’ve done this you can now register your Public methods to be scriptable by using the [ScriptableMember] attribute.

[ScriptableMember]
public void UpdateCities(string country)
{
      List<CityData> myCities = _getCities(country);
      _cities.ItemsSource = myCities;
      . . .

Calling the .NET Method from JavaScript

The first thing you should make sure of is that the Silverlight object has an ID. This is needed so that JavaScript can get a reference to it.

<object data="data:application/x-silverlight," 
           type="application/x-silverlight-2-b2" 
           width="300" height="400" id="slControl" VIEWASTEXT>
           ...
</object>

Now JavaScript can get a reference to your Silverlight control based on this ID:

var slPlugin = document.getElementById("slControl");

To call the .NET based method you then use the syntax:

<PluginID>.content.<ScriptableObjectName>.method(parameters)

The JavaScript function called ChangeCountry(country) does this:

function ChangeCountry(country)
{
      var slPlugin = document.getElementById("slControl");
      slPlugin.content.MySilverlightObject.UpdateCities(country);
}

The HTML Input buttons call this and pass the relevant country.

<input id="bUK" style="width: 100px" type="button" 
     value="United Kingdom" onclick="doCities('United Kingdom');" NAME="bUK"/>
<input id="bGermany" style="width: 100px" type="button" 
     value="Germany" onclick="doCities('Germany');" NAME="bGermany"/>
<input id="bFrance" style="width: 100px" type="button" 
     value="France" onclick="doCities('France');" NAME="bFrance"/>

When the user presses an HTML button, the JavaScript function doCities will execute. This calls the Silverlight scriptable object and passes the parameter to the UpdateCities method in the .NET code for the SilverLight control. The parameter is used to create a List<CityData> of cities for the selected country, which will then be bound to and displayed in the ListBox.

Further Study

In the this section, you saw how to access the .NET code from within JavaScript, but in addition to this you can also manipulate the XAML that Silverlight renders using JavaScript in the browser. Furthermore, Silverlight isn’t restricted to the XAML that is defined as part of the Visual Studio / Blend project. It can be dynamically added and removed at runtime from within JavaScript too!

Here’s some good material for further review:

http://msdn.microsoft.com/en-us/library/cc645076(VS.95).aspx

Calling Browser Script from .NET

Thus far we’ve seen how you can call .NET code from JavaScript within the browser – but what about the other way? The Web ADF has a public JavaScript interface, so instead of building your own Silverlight host for the Web ADF, it’s much easier to have Silverlight call out to the browser and use JavaScript to interact with the Web ADF Map control.

Earlier you saw that pressing HTML buttons that represent different countries will cause cities from those countries to be loaded into the Silverlight content. When you select a city name (in the Silverlight control) it will call a JavaScript function that locates the selected city on the map based on its latitude and longitude.

You can see it in Figure 2.

Locating a selected city

Figure 2. Calling the browser from Silverlight in order to use the Web ADF

Note that the XAML ListBox binds to the CityName, Longitude and Latitude. The latter elements are ‘hidden’ by setting their height value to ‘0’.

Note also that the SelectionChanged Event handler is wired up to the ListBox that contains the TextBlock elements. This means that every time the selection changes, the event will be captured and the values of the selected CityData item can be derived, allowing us to pull the Name, Latitude and Longitude of the current city.

Let’s take a look at this event handler.

private void _cities_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
     if (_cities.SelectedItem == null)
      	return;

     CityData cd = _cities.SelectedItem as CityData;
     ScriptObject myScriptMethod = 
          (ScriptObject)HtmlPage.Window.GetProperty("GotoCity");
     myScriptMethod.InvokeSelf(cd.Latitude, cd.Longitude);
}       

Working with the ScriptObject is where the fun begins.

The HtmlPage class allows us to get a reference to a JavaScript function by invoking its Window.GetProperty method and passing it the name of the function. This has to be cast as a ScriptObject in order to be callable:

ScriptObject myScriptMethod = (ScriptObject)HtmlPage.Window.GetProperty("GotoCity");

Now you can call the function using InvokeSelf and pass it the appropriate parameters:

myScriptMethod.InvokeSelf(cd.Latitude, cd.Longitude);

Of course the function GotoCity has to exist on the page, and it has to match the signature that is being used to call it.

Here’s the JavaScript function that takes latitude and longitude and centers and zooms the Web ADF map on these coordinates. Note that Web ADF JavaScript components, which includes the map client control (a scriptable server control), are used to manipulate the map and its contents.

function GotoCity(latitude, longitude) {
      // if map does not exist, get it
      if (map == null)
      	   GetMap();

      // if graphic exists, remove first
      if (graphics)
      	   map.removeGraphic(graphics);

      // mark location
      var sym = new ESRI.ADF.Graphics.MarkerSymbol("images/pin.png", 16, 32);
      var point = new ESRI.ADF.Geometries.Point(longitude, latitude);
      var feature = new ESRI.ADF.Graphics.GraphicFeature(point, sym);
      map.addGraphic(feature);
      graphics = feature;

      // Zoom to Envelope using Lat/Long
      var env = 
            new ESRI.ADF.Geometries.Envelope(
            longitude - 0.05, latitude - 0.05, 
            longitude + 0.05, latitude + 0.05);
      map.zoomToBox(env, true);
} 

Further study

In addition to calling JavaScript functions, you can also use .NET code to manipulate HTML elements.

Retrieve the HtmlElement using the element name in a call to HtmlPage.Document.GetElementByID(‘elementName’).

Manipulate the element by calling the ‘setAttribute’ method and providing an attribute name and value: element.setAttribute(“attributeName”, value);

Deploying the Silverlight Web Application to your Web Server

Now that you have a built application, you may be wondering what it might take to deploy the ASP.NET application with Silverlight content. Well, there are several ways to deploy the application, all of which are described on the Microsoft ASP.NET and Silverlight Web Sites. Let me describe a couple of them for you.

Pre-compiled Web Site

First, in Visual Studio, you can right-click on the web application project and select the “Publish Web Site” menu item.

Publish Web Site menu item

Figure 3: Publish Web Site Menu item from a right-click context menu

A dialog will appear that will ask some questions and then you'll click OK to deploy.

Publish Web Site dialog box

Figure 4: Publish Web Site Dialog Box

XCOPY Deployment

Another option is the old copy and paste or XCOPY deployment. Simply copy your web application files (SLADFIntegrationWeb) to the production server hard drive and use Internet Information Services Manager to configure a virtual directory as a Web application.

Final notes

In both cases, you may need to add a MIME type to support the Silverlight content. The following web site discusses those steps in detail:

http://blogs.msdn.com/tims/archive/2008/03/18/configuring-a-web-server-to-host-silverlight-content.aspx

Other Web Sites to further your study on ASP.NET and Silverlight Deployment options are:

ASP.NET Deployment Overview

Walkthrough: Deploying an ASP.NET Web Application using XCOPY

That’s it! Enjoy!

Contributed by Arthur Haddad of the ArcGIS Server .NET development team

Posted by sterlingdq | 6 Comments

Understanding the 9.3 System Requirements

The ArcGIS Server 9.3 system requirements are available at http://wikis.esri.com/wiki/display/ag93bsr/ArcGIS+Server. You can access them from the ESRI Support page or ArcGIS Resource Center. The system requirements are now broken up by the different components of ArcGIS Server, which are the Server, Clients, Developer Solutions, and Database.

  • The Server components are the Server Object Manager (SOM) and Server Object Container (SOC). This section (Server Requirements) lists the various operating systems on which we support the Server components and any limitations that we may have. For example, if you’re interested in knowing if Windows Server 2008 is supported, go to the Server section, follow the "Supported Server Platforms" link and you’ll find that it is supported. Then follow the "Operating System Requirements and Limitations" link and you’ll find that for this operating system there is a limitation if using the ArcGIS Server .NET Manager. In addition to finding operating system limitations, you’ll also find any specific system requirements for running the Server component such as display requirements and required library packages.
  • The Client components section (Supported Clients) lists different tools that we support in which you can access services and applications from ArcGIS Server. Such tools include supported browsers and mobile devices.
  • The Developer Solutions section (Developer Solutions Requirements) is where you’ll find system requirements for the ArcGIS Server application developer frameworks (ADFs). This includes supported application/web servers, and integrated development environment (IDE) requirements for the Web ADF for the Microsoft .NET Framework, Web ADF for the Java Platform, and Mobile ADF. For example, you’d like to run Internet Information Server (IIS) as your web server for web applications developed with the Web ADF for the Microsoft .NET Framework. Check this section to see that IIS is supported and find which operating systems (both 32-bit and 64-bit) we support it running on.
  • The Database component consists of support for various relational database management systems (RDBMS) that we support with ArcSDE. This section (Supported Relational Database Management Systems (ArcSDE)) indicates, by RDBMS, the supported database version and operating systems. It will also include any specific database requirements and operating system limitations. For example, if you’d like to know if PostgreSQL is supported with ArcGIS Server 9.3, go to this section of the ArcGIS Server system requirements to see a list of RDBMSs supported. There you’ll find a link to PostgreSQL and, if followed, all the specific system requirements for running ArcSDE on PostgreSQL can be found.

In general, all the ArcGIS system requirements pages have a consistent look and feel. Navigation throughout the pages is also similar. By default, the system requirements will display the 9.3 requirements. If you’d like to see support for previous versions, go to the top of the page and follow the link where it indicates, "Need info for 9.2, 9.1 or earlier versions?"

For every product system requirements page, there is a Table of Contents at the top of the page that consists of the different sections of the page. For example, for ArcGIS Server, it contains the different components of ArcGIS Server. Follow these links to take you directly to the section in the page. Click the red arrow beside the section header to take you back up to the Table of Contents.

Finally, general information can also be found in the "Related ESRI Materials" section, which typically includes the ESRI Supported Environment Policy and System Design Strategies that are appropriate for all ArcGIS products.

Contributed by Valerie Alcantara, Release Manager for the ArcGIS Server and ArcIMS teams

The REST API cache

"I published my map service but I don't see it in my Services Directory."

We've received similar questions on the forums from users asking why their services are not showing up in the Services Directory. The reason in most cases is that they didn't clear the REST API Cache. This blog post talks about how and when you might want to clear this cache. It also gives a brief background about the REST API Cache, its benefits and side-effects.

The REST API caches information about folders and services to boost performance. The REST application is implemented such that the first time a service (or a folder) is accessed it fetches the information for that service from ArcGIS Server and caches it. This means that subsequent requests to the service will be served from the internal cache, saving another trip to the server. This reduces resource consumption and improves performance.

Here's a Python script that accesses all services and folders within a given REST application instance. Here is a table of the times it took to run through the entire catalog on various servers deployed internally within ESRI.

Server (not their actual names)1st run time taken (in secs)2nd run time taken (in secs)
server1 16.125 0.531
server2 13.344 0.578
server3 12.625 0.547
server4 59.296 0.500
server5 70.968 0.531
server6 29.640 0.328

While your actual numbers might vary, you can see there is a substantial difference in the time it takes to run through the catalog the first time (when the information is not cached) and the second time (when the information is cached).

Remember that the first access will take a performance hit as indicated by the numbers above. This hit comes not only in accessing the service information from the server, but also in initializing the servlets and JSPs (for Java), and the HTTP handlers and modules (for .NET). If you do not want a user to take this performance hit, you can run this script and let your users benefit from the cache that gets populated by running the script.

Caching information in this manner also has a side-effect in that if you add, remove or update services on the server, those changes might not get picked up by the REST API. This is where the REST Admin plays an important role. Administrators can use the REST Admin to clear the REST API cache either manually with the click of a button or configure it such that the cache automatically gets cleared periodically. The REST API includes detailed documentation for both the REST Admin as well as for the various configuration options available to you.

Again, you can download the full script here. (It uses the simplejson library which can be downloaded from here.)

Contributed by Keyur Shah of the ArcGIS Server development team
Posted by sterlingdq | 3 Comments
Filed under: , ,

Design patterns for Web maps

Web maps often contain a base map, which provides a geographic frame of reference, and operational (or thematic) layers, which show a focused item of interest on top of the base map. A familiar example might be an online mapping service that provides real time traffic information on top of a city street map. The street map is the base map. It doesn’t change much and can be used for many purposes. The traffic information is the operational layer because it frequently changes and has a specific purpose and audience. This article describes different patterns for building Web applications that overlay base map and operational layers.

Base maps and operational layers often require separate strategies for effective maintenance and display in Web maps. When creating a Web map, it’s a good practice to separate the base map from the operational layers. Base maps generally require little maintenance and should almost always be cached, whereas operational layers may require creative strategies to present the most current data in a high-performance way.

Separating your base map and operational layers requires that you create at least two map documents (.mxd’s), which you subsequently publish as two distinct map services. Each becomes a map service layer in the overall Web map. A map service layer originates from a map document that may itself contain many layers.

This may seem strange to you if you’re new to Web mapping; perhaps your company has one map document with dozens of layers that they’ve used for years. For performance and flexibility reasons, it may be time to break up that monolithic map document. When you create multiple map documents, each containing a logical group of layers such as base map features, cadastral features, and so on, you can publish them as separate services and target your display strategies for each.

Strategies for displaying the base map

To provide the rapid performance expected by Web users, the base map should be a cached map service. The cache consists of a pre-generated set of map images that the server can distribute to clients. Base maps and their accompanying map caches are generally easy to maintain because the data does not change frequently. When the data does change, you can update the cache.

Cached base map of imageryHere’s an example of a cached base map of imagery. Your base map could also contain street networks, terrain, or any type of features that provide a context for the operational layers.

Your base map cache can come from an existing online map service, or it can come from your own map. Examples of existing cached base maps include the street maps, imagery, and shaded relief layers available on ArcGIS Online. Google Maps and Microsoft Virtual Earth also provide base map layers which you can access through ESRI JavaScript extensions to their APIs.

If an existing base map doesn’t fit your needs, you can author your own high quality map in ArcMap and use tools included with ArcGIS Server to create a cache. You’ll get the best performance in your web applications if you choose to fuse all of the layers in your base map when building the cache for the base map service. You won’t be able to turn layers within the base map layer in the Web map on and off, but you will see exceptional performance. If there are some layers that users must have the ability to turn on and off, separate them out into a separate base map service with its own fused cache, or treat them as operational layers.

A good caching strategy is to create tiles for only the area that you need. By default, the caching tools create tiles for a rectangular extent (the Full Extent of the map in ArcMap), but using the ArcGIS Server 9.3 caching tools you can specify a feature class whose boundaries determine where cache gets created. For example, you could use a feature class of the state of Florida, which is shaped like a rotated L, to create tiles only covering land in Florida. This way you avoid caching large areas of water in the Gulf of Mexico which fall within the rectangular extent of Florida.

If you have a large geographic area to cover and limited server resources to create and store the tiles, you might consider caching some of the area on demand. Using the cache by feature class strategy, you can pre-generate cache tiles for popular areas and leave the less-popular areas to be created as visited by users, with the first visitor incurring a performance penalty.

If you edit data in your base map, you’ll need to update the cache tiles in order for users to see the edits. You can save time by limiting the update to just the areas that have changed. Remember that if you’ve created some tiles on demand, you’ll need to include those in the update. You might just delete any tiles that have been created on demand, letting them be created again if a user decides to visit the area.

You can script cache updates and schedule them to run on nights or weekends to minimize interference with normal server traffic.

Strategies for displaying operational layers

Operational layers, such as vehicle locations, cadastral features, utility networks, and weather data, can be more challenging to represent because of their constantly changing nature. Following are several strategies you can use to represent operational layers in your Web map.

Display the operational layer as client-side graphics

As the user zooms, pans, or clicks the map, you can query the operational layer for features in the visible extent and display them in the browser as client side graphics. This “query on demand” pattern offers several advantages:

  • It ensures that you are only loading the features that you need.
  • It takes advantage of the CPUs available on your users’ machines, thereby lightening the load on your server’s CPU.
  • If you’ve made edits to the data they will show up right away the next time the user navigates.
  • You can easily expose display options and symbology to users through JavaScript. This is useful for thematic mapping applications like this one, and for turning layers on and off.

Operational layer using client-side graphicsHere’s an example of a map that displays land parcels as an operational layer using client-side graphics. Notice that you cannot see the parcels until you zoom in to the second-to-last layer. This ensures that you won’t exceed the number of maximum returnable records. The parcels are not labeled but if you click one you can immediately get its information in an info window.

You might even choose not to display any features until they are requested by clients through events such as clicking the map. For example, this application invites the user to click a location on some high resolution imagery and shows the parcel at that point using a graphic.

Labeling can be a challenge with client-side graphics. Although you can display text symbols with your graphics, there is no labeling engine determining the best placement of the text to avoid label overlap. Fortunately, with client-side graphics the attribute information is usually already loaded and can quickly be displayed in an informational window when the user clicks or hovers the mouse on the feature. You can also use grids, charts, and other widgets to show information in response to map events.

When using the “query on demand” technique, you need to guard against the scenario of users requesting too many features. It is possible to overwhelm the browser and the network by fetching large amounts of features into the client and you need to design your user experience and application so that this is dealt with gracefully.

All map services have a MaxRecordCount property, which determines how many features they will return on a query. By default it is set to 500. You need to either adjust this value or ensure that users will not be able to pan or zoom to a level in your map where they would be requesting more than 500 features.

The ArcGIS Server REST and SOAP Web service interfaces allow applications to query map services using the QueryFeatures, Identify and Find operations.

The ArcGIS Javascript APIs and the ArcGIS Server Web ADFs expose this ability through their QueryTasks.

Display the operational layer as a dynamic map service

A second option is to use a dynamic map service to represent the operational layers. In a dynamic map service, the server draws the map image at the requested extent. This image is then overlayed on the cached image from the base map. The overlay usually occurs on the browser.

Operational layer using a dynamic map serviceThis example shows a dynamic map service of zoning and parcels overlaid on a cached base map of imagery.

Although dynamic map services have been the traditional approach to Web mapping, they put more load on the server than on-demand queries or cached map services. If you need to use a dynamic map service, you can optimize performance by paring down your map to display the minimum number of needed layers with the simplest symbology that would be appropriate.

Dynamic map services show users all the data in the current extent for each visible layer including, in some cases, data that may not necessarily be used in making decisions. In other cases seeing the "complete spatial fabric" is important. For example, users may want to always see the complete electrical network in the view for context as opposed to just specific transformers and service lines. Querying all these features into a browser and rendering them on the client side would be impractical, so a dynamic or cached map might be the best choice. A dynamic service gives the advantage of users being able to turn any layer on or off.

The ArcGIS Javascript API exposes dynamic mapping through the ArcGISDynamicMapServiceLayer. The ArcGIS Server Web ADFs expose this ability via the ArcGIS Server map resource, which draws a dynamic map if a cache is not available. The ArcGIS Server REST and SOAP Web service interfaces provide applications with dynamic mapping via the ExportMapImage operation.

Display the operational layer as a cached map service

A third option is to display your operational layer as a cached map service. Caching is appropriate if your operational dataset changes infrequently, covers a limited area, or does not cover large scales.

Operational layer using a cached map serviceThis example shows a cached operational layer of zoning and parcels overlaying a cached base map of imagery. Notice that the operational layer loads quickly, but is not available at the two largest scales. For demonstration purposes, we did not build the cache at those levels. This reveals one weakness of using a cached service for your operational layer: cached services can take large amounts of resources to generate, store, and update at large scales.

Out of the three techniques in this article, caching gives the best performance because the application only needs to get an image from the server. When you navigate a cached map, you don’t have to wait for any map drawing or data transfer operations. Cached map services also offer the best cartographic potential because you don’t have to worry about cartographic embellishments slowing your map navigation (although they will slow cache generation.)

When you create a cache for your operational layer, it’s a good idea to match the tiling scheme of the base map. The tiling scheme includes the tile dimensions and potential scales used by the cache. Matching tiling schemes are required for some clients, such as the ArcGIS JavaScript API, to successfully perform the overlay. A matching tiling scheme implies that the coordinate systems used by the data frames match; however, the coordinate systems of the source datasets do not have to match.

It’s recommended that you use PNG 8 image format when you cache any layer that will be displayed over a base map. PNG 24 is not a good choice because Internet Explorer versions 6 and earlier have limitations with displaying transparency in this image format. JPG is not an option because it does not support transparency. If you’re trying to match a tiling scheme from another service, you don’t have to match its image format in order for the services to overlay successfully.

You can script and schedule updates to the cache, just as you can with the base map. With operational layers you may need to update more frequently, depending on the nature of the datasets. When you first build the cache, note how long it takes so you know how much time to allot for an update. You can reduce your update time by separating your operational layers from the base map, limiting the number of scales at which the data is visible, and using simple symbology and labeling.

The ArcGIS Javascript API exposes cached map services through the ArcGISTiledMapServiceLayer. The ArcGIS Server Web ADFs expose this ability via the ArcGIS Server map resource, which uses cache tiles if it detects they are available. The ArcGIS Server REST and SOAP Web service interfaces also provide ways to retrieve tiles from a cache.

Contributed by Sterling Quinn, Jeremy Bartley, and Sud Menon of the ArcGIS Server development team.

ArcGIS API for Flex (beta) now available

The ArcGIS API for Flex is a powerful framework for building rich internet applications (RIAs) on top of ArcGIS Server that look good, run fast and are fun to use. The Flex Resource Center includes help and samples for the API and is part of the ArcGIS Server Resource Center web site.

What can you do with the ArcGIS API for Flex?

  • Display an interactive map of your own data.
  • Execute a geoprocessing model on the server and display the results.
  • Display your data on an ArcGIS Online basemap.
  • Search for features or attributes in your GIS data and display the results.
  • Locate addresses and display the results.
  • Visualize results in creative ways.
  • Create mashups.
Solar Boston application

Solar Boston map is built with the ArcGIS API for Flex. It's an interactive mapping application that showcases active renewable energy installations in Boston.

What is included in the ArcGIS API for Flex?

  • Maps — Supports both dynamic and cached (tiled) map services from ArcGIS Server 9.3 and works with map projections. It also works with any version of ArcIMS.
  • Graphics — Gain the ability to draw graphics or provide popup windows when users click or hover the mouse.
  • Tasks — Support for common GIS tasks: querying, finding addresses, finding attributes, identifying features, and geoprocessing.
  • Access to Flex components — The API is built on the Adobe Flex framework which allows you to use rich Flex components such as data grid, trees, panels and charts.

How do I learn how to use the ArcGIS API for Flex?

The best way to learn the API is to visit the ArcGIS API for Flex Resource Center. If you're new to Flex programming and ArcGIS Server, the concepts will help you understand what Flex is and how to start working with it in ArcGIS. When you want to see more code, take a look at the live samples. The samples cover a range of topics and provide a great starting point for your applications. A detailed API reference describes each class available in the API. The community page gives quick access to relevant forums, knowledge base articles, and the ArcGIS Server blog.

What support is available?

For now, the user-to-user forum is the support channel. Final release is expected later this year, and then full ESRI support will be available.

Contributed by Bjorn Svensson of the ArcGIS API for Flex development team
Posted by sterlingdq | 1 Comments
Filed under: ,

2008 UC Featured Workshop: Case Studies of Building and Deploying Enterprise ArcGIS Server Solutions

ArcGIS Server has a scalable architecture that can accommodate a few users in a small office to thousands of users scattered worldwide. If you’re in charge of a large deployment, consider attending “Case Studies of Building and Deploying Enterprise ArcGIS Server Solutions” at the ESRI User Conference.

Wittaker Mathot and Carsten Piepel from ESRI Professional Services will present this session. Both have extensive experience helping customers deploy ArcGIS Server in enterprise environments. Their presentation will include best practices and pitfalls they’ve learned from these experiences.

This session will be most valuable to those implementing large deployments of ArcGIS Server, but some of the principles discussed could be applied to smaller deployments. It’s helpful that you have basic knowledge of ArcGIS Server and the ESRI product line before attending this session.

Case Studies of Building and Deploying Enterprise ArcGIS Server Solutions

  • Wednesday, August 6, 3:15 PM – 4:30 PM
    Room 14 B
  • Thursday, August 7, 3:15 PM – 4:30 PM
    Room 6 F

A quick look at the versatile spatial filters in the ArcGIS JavaScript APIs

Using the Query class geometry property as a spatial filter is one of the most important and versatile aspects of the ArcGIS JavaScript API and its extensions for the Google Maps API and Virtual Earth. This functionality lets you pass a point, line, multi-point line, bounding box, or a polygon to a QueryTask without having to worry about handling any particular aspects of the shape. A QueryTask uses the geometry to perform a query operation against a map service layer resource that has been exposed through an ArcGIS Server REST API URL. An example of a QueryTask is to return the attributes for all census blocks that exist inside the geometry with a population greater than 200.

To make this work, all your application needs to do is create a valid shape either by manually defining its attributes and vertices, or using one of the built-in drawing tools that comes with the API or extensions. Continuing with the example mentioned above, you can use a hand-drawn polygon to define a demographic study area. As soon as the drawing is complete, as detected a the mouse listener, you can have the code pass the polygon directly to the QueryTask which then returns the demographic population attributes for the area.

Below is an JavaScript code excerpt showing how you might use the geometry property with the extension for the Google Maps API.

function enableDrawing()
{
//create a new polygon and add it to the map
polygon = new GPolygon([], "#DC143C", 2, 1.0, "#00FFFF", 0.5);
map.addOverlay(polygon);
//activate the Google browser drawing functionality
polygon.enableDrawing(options);
//register a listener for "endline" event
GEvent.addListener(polygon, "endline", runQueryTask);
}
function runQueryTask()
{
//Assign the polygon geometry to the queryGeometry property.
//And, define what attribute fields to return in the FeatureSet
query.queryGeometry = polygon;
query.returnGeometry = true;
query.where = “POP2000>200”;
query.outFields = ['POP2000','HOUSEHOLDS','BLOCK'];

//execute the Query Task and then display the results
qtask.execute(query,false,displayStats);

esri.arcgis.gmaps.Config.proxyUrl = "proxy.ashx";
}

The online help provides a more detailed discussion on how to use Query and QueryTask with the JavaScript APIs. Or, go here to see a short (4 min.) video demo.


Contributed by Andy Gup, Technology Lead for the ESRI Developer Network (EDN).
Posted by sterlingdq | 0 Comments
Filed under: , ,

Showcase your ArcGIS Server application in the Code Gallery

One purpose of the new ArcGIS Resource Centers is to strengthen the community of ESRI software developers. You can contribute to this community by sharing your application in the code gallery.

The code gallery is a place where you can highlight your work and download examples that might help you with your projects. Each API has its own code gallery page in the Resource Center. Here are some quick links:

The code gallery environment contains various options for showcasing your project and learning about other entries. For example, you can:

  • Include a link to a live application with your entry
  • Include a thumbnail graphic of your entry
  • Subscribe to the RSS feed of a particular entry
  • Rate and comment on entries

We’ve uploaded a few examples to get you started. For example, the Earthquake Population Stats application uses the ArcGIS JavaScript API to bring in live data from USGS showing where recent earthquakes have occurred. It can also use a geoprocessing task to calculate how many people live within 100 miles of a selected quake.

On the .NET ADF side, check out the Add Data Control for adding layers to a Web Mapping Application at runtime, or the Flickr Search Task that lets you search the Flickr online photo database and display the results on a map with interactive map tips. There’s also a nifty Java ADF entry that shows how you can add shapefile layers to a map service on the fly.

The code gallery is now open and we look forward to seeing your submissions!


-Sterling Quinn and David Cardella
Posted by sterlingdq | 0 Comments
Filed under: ,

.NET Web ADF supports curves at 9.3

In this post Product Engineer Derek Weatherbe discusses support for curves added to the .NET Web ADF at 9.3

At 9.2, using Identify or executing a task against a feature that had a curved segment would not work. Prior to Service Pack 3, this action would return an ‘object reference' error. At SP 3, we started capturing this error to return the more descriptive ‘Curves are not supported’ exception.

At 9.3 we enhanced ArcGIS Server map services to return densified geometry when requested. We now leverage this in the ADF so that Identify and other tasks can return results for features that contain curves and highlight them. The SOM, SOC and Web ADF must be at version 9.3 for this to work.

Posted by sterlingdq | 2 Comments
Filed under: , ,

2008 UC Featured Workshop: Securing your ArcGIS Server Site (Java and .NET)

The technical workshop Securing your ArcGIS Server Site will discuss best practices for security and will review ArcGIS Server security enhancements in 9.3. Both server administrators and developers can benefit from this session. Separate sessions are offered for Java and .NET.

Shreyas Shinde (ArcGIS Server Java Developer) and Jay Theodore (Java Web ADF Development Lead) will present the Java security session. According to Shreyas, the session is for “administrators interested in setting up a secured GIS site, JavaScript application developers who could be working with secured services, [and] developers who are interested in extending the security functionality.”

Bryan Baker (ArcGIS Server .NET Product Engineer) and Sud Menon (ArcGIS Server Development Lead) will present a similar session for .NET. Additionally, Bryan plans on showing how to set up a reverse proxy with ArcGIS Server (a recommended way of sharing your ArcGIS Server on the Internet) and demonstrating how to pass a browser user’s identity to the GIS services. This allows you to show or hide services in a Web application based on a user’s login.

Securing your ArcGIS Server for the Java Platform Site
  • Tuesday, August 5, 1:30 PM – 2:45 PM Room 8
Securing your ArcGIS Server for the Microsoft .NET Framework Site
  • Tuesday, August 5, 3:15 PM – 4:30 PM Room 8
  • Wednesday, August 6, 3:15 PM – 4:30 PM Room 8

Administrative privileges no longer required to log in to Manager at 9.3

Here's a 9.3 improvement that’s not immediately visible, but may simplify the way you work with Manager in your GIS department. In ArcGIS Server for the Microsoft .NET Framework 9.2, you were required to have Administrator privileges on the Web server in order to log in to Manager. At 9.3 you no longer have to be an Administrator; you just need to be a member of the agsadmin group on the SOM machine.

Non-Administrators can view, create, stop, start, and delete services. As a non-Administrator, you can also work with the GIS server by modifying SOC machines, log file properties, server directories, and so on.

If you’ll be creating or editing Web applications within Manager, you’ll still need to log in as an Administrator at 9.3.

This change does not affect ArcGIS Server Manager for the Java Platform. Due to the difference in the way applications are deployed to the Web server, administrative privileges have never been required to log in to Java Manager.

Posted by sterlingdq | 0 Comments
Filed under: , ,

The new face of EDN

If you've been looking for developer help on edn.esri.com recently, you'll notice the site has been pared down to just a few links. The 9.3 Developer Help is now available through the various product Resource Centers, while the old EDN site is still available for legacy content. Jim Barry, who coordinates much of the work with the EDN site, contributed a post on the ArcObjects Development Blog explaining the change.

The new EDN start page

Posted by sterlingdq | 0 Comments
Filed under: ,

What's new in ArcGIS Server 9.3

ArcGIS 9.3 has been shipping for several weeks now. You can read about some of the enhancements to ArcGIS Server in the “Putting GIS on the Web” section of What’s new in ArcGIS 9.3. We’ll be talking about some of these enhancements on this blog in the coming weeks.

Here are a few examples of new things you can do that are explained in the What’s New document:

  • Add printing capability to your Web applications and format map tips in Manager
  • Build and deploy mobile projects directly from .NET Manager
  • Build .NET Web ADF applications whose client and server-side components leverage ASP.NET AJAX
  • Publish raster imagery directly to the server using the new image service
  • Build map caches based on the boundary of a feature class and cache the rest on demand
  • Administer security through Manager
  • Publish OGC Web Feature Services (WFS) and Web Coverage Services (WCS)
  • Make your server contents searchable on the Web with the new Services Directory application that works off REST
  • Embed maps in your Web sites with JavaScript
  • Create Google Maps API applications, Google Mapplets, and Microsoft Virtual Earth mashups that use your services
Posted by sterlingdq | 4 Comments
Filed under:
More Posts Next page »