Monthly Archives: September 2010

In Business Analyst 10, we’ve added the ability to change the default cartographic outputs. So instead of grids being yellow-to-red, you can make them green-to-blue. You can also indicate your customers as a symbol instead of the standard dots.

For example, you are probably used to seeing this familiar ring look and feel…

But with some simple adjustments, the same rings can look like this (every time)…

We’ve done this by exposing the Business Analyst tools in the ArcGIS Style Manager. You can try this by going to Customize > Style Manager> Business Analyst.style to access the folders and tools to make modifications. The yellow folders are customizable. In the example below, you can click MarketPenetrationRamp to change the green default color scheme to another style. The next time you create a Market Penetration analysis, your new style will be applied.

Note that some operating systems, such as Windows 7, might lock the .style files due to security settings. You can change your permissions or run ArcMap.exe as an administrator from the ArcGISDesktop10.0Bin directory. This will allow you to change the cartographic settings mentioned above.

In our last blog post, we talked about map packages and answered some of your questions about them. Now, you might be ready to use and share map packages. Here is a quick guide to help you get you started. Continue reading →

The GetFeatureInfo operation on a WMS is designed to return attributes of features in the map. The WMS spec doesn’t really define the schema for the GetFeatureInfo response, so you’ll see it handled differently as you look at various WMS implementations. With an ArcGIS Server WMS, you can request the feature info in various formats, including HTML, XML, and plain text.

For example, here’s a GetFeatureInfo request along with its response in the default HTML format:

In many cases, the default response in HTML, XML, or plain text may be good enough for your own purposes, but there may be times when you want to customize the response format or schema. Perhaps you want your own look and feel to the response, or for interoperability reasons maybe you want to get the feature information back in a standard schema like GML or GeoJSON.

In ArcGIS Server 10, both server administrators and WMS clients can customize the GetFeatureInfo response using XSLT templates. This blog post explains the basic steps.

Background

When you work with a WMS created by ArcGIS Server, the GetFeatureInfo response is generated by applying an XSLT template on a raw internal XML format. This internal XML just contains a list of fields and values of identified features. A default XSLT template for the particular format (HTML, text, etc.) is applied to make the final response look readable.

Knowing this workflow, you can customize both the format and schema of the GetFeatureInfo response. You need to understand:

Each <FeatureInfoCollection> element contains the attribute fields and values of all identified features from a single WMS layer.

The information for a single identified feature is contained in a <FeatureInfo> tag. Notice the name-value pair for each field.

Since the whole idea of XSLT transformation involves converting one format of information to another, it’s really important to take some time to understand the above format before you continue.

Default XSLT templates in ArcGIS Server

The ArcGIS Server 10.0 installation comes with XSLT templates for the supported formats listed in the WMS’s capabilities files. You can see these default templates if you open <ArcGIS Server install location>StylesWMS. As indicated by their names, each template is used to produce the default GetFeatureInfo response in a given format. In example at the beginning of this post, the HTML table with the blue caption was produced thanks to the default XSLT for the HTML format.

If you ever need to get the raw XML as the response, you can set the GetFeatureInfo request parameter INFO_FORMAT to application/vnd.esri.wms_raw_xml. You might do this if you wanted to create your own template and you needed some understanding of the raw format.

How to customize your WMS GetFeatureInfo response

Given all of the information above, let’s explore a couple of ways you can customize the WMS GetFeatureInfo response in ArcGIS Server 10.0.

Modify the default XSLT templates in ArcGIS Server

You’ve seen where the default XSLT templates live, and one option is to just open them up and start tweaking the styles to fit your liking. Remember, though, that if you change these templates, it will affect any WMS published through ArcGIS Server. For this reason, avoid trying to put any map-service-specific logic into the templates.

Here’s an example change to featureinfo_text_html.xsl, the HTML template. If you opened the file in a text editor and replaced the <Style> tag with the following, you would see the table caption color change to red.

Override the behavior of the default XSLT template using the xslt_template parameter

xslt_template is an Esri-specific parameter that you can set to the URL of an XSLT template file. The ArcGIS Server-produced WMS will then pick up the template and override the default template.

When using the xslt_template parameter, your XSLT template doesn’t have to follow the same naming convention as the default templates, but it does need to be available through a URL; a local path or UNC path won’t work.

Here’s an example of a GetFeatureInfo request with the xslt_template parameter:

The above template has been created to make the WMS return its GetFeatureInfo responses in plain text instead of the default HTML format. In fact, here this plain text is styled in the popular GeoJSON format. GeoJSON can be parsed by many JavaScript libraries, allowing you to integrate your responses with your Web pages in an easy-to-read format.

Here’s an example of using a GetFeatureInfo GeoJSON response as a data source of an Ext.Grid in an OpenLayers Web Map application:

Click here (or right-click the link and save) to see the code for an example template that could be used to embed a video object in the response.

Click here (or right-click the link and save) to see the code for a more comprehensive example that heavily customizes the GetFeatureInfo HTML response to embed a JavaScript code snippet. The code plays a tour in the Google Earth plug-in Web application.

Notice that in this XSLT template, there is logic specific to a particular WMS service. Therefore, this template should always be referenced through the xslt_template parameter; it should not be made the default template.

Map packages were a popular topic at the Esri User Conference this year, and we got quite a few questions about them. In this blog entry, I will cover some of those questions, as well as give a brief introduction to the new map package functionality that is available with ArcGIS 10. Continue reading →

One of the new features introduced with the recent ArcGIS Online update (which went live last week) is the ability to view the number of downloads for shared items. For example, looking at the USA Population by Zip Code shared layer package below you’ll see that there have been 665 downloads:

The downloads are of interest to those that have shared items, and provide an indication of the item’s popularity to those browsing for data.

This one seems less popular:

The names are hidden to protect the guilty – we’d suggest that if you really want users to to download what you’ve shared that a good thumbnail, title, and summary description are a must!

Shared item types that display downloads are:

map packages

layer packages

desktop application templates

map templates

web mapping applications with code attachment

mobile applications with code attachment

windows mobile packages

code and geoprocessing samples

You can also learn more about an item’s popularity by looking at the rating, comments, and views.

Often the author of layer packages is using ArcMap and 2D symbols that drape, instead of billboard, when viewed in 3D mode in ArcGIS Explorer. Here’s some great information from Mark Bockenhauer in a recent ArcGIS Desktop blog post about how to author layer packages that work well in both display modes.

Some ArcGIS servers will undergo systems maintenance beginning Thursday, September 30, at 5:00 p.m. PDT. The maintenance will last approximately 12 hours. During this time users will experience temporary issues with registering a Global Account with ArcGIS.com, changing passwords, activating Subscription services, and signing up for an ArcLogistics trial. If you already have an existing account with ArcGIS Online, ArcGIS.com, or ArcLogistics, no downtime is anticipated.

The next live training seminar on ArcGIS 10 is this Thursday. This Seminar will introduce you to the new way to customize and extend
ArcGIS Desktop using the Microsoft .NET Framework. ArcGIS Desktop 10
introduces the new Add-In framework to easily build and share solutions.

This seminar is for ArcGIS Desktop users who want to learn how to create or share ArcGIS Desktop add-ins

These contributions have been made through the Community Maps Program, designed to enable GIS users worldwide to contribute their authoritative content and become part of a freely hosted GIS community basemap. The data is integrated with data from other providers using a map template, then published through ArcGIS Online as a free, hosted map service.