The Thematic Sample adds thematic mapping symbolization capabilities on top
of the Map Viewer Template. Outwardly, the map display in this template looks
the same as that of the Map Viewer Sample. This sample, however, allows the
end user to dynamically change how individual layers are drawn.
This sample allows the application user to draw layers so that they communicate
how much of something there is. For example, given a layer of population data,
the application user could create different map displays that highlight the
distribution of different segments of the population.
When you draw quantitative data, you typically classify the data--or group the data into
classes. A good example of classified data is a temperature map you might find in a
newspaper. Instead of displaying individual temperatures, these maps show temperature
bands, where each band represents a given range in temperature. This sample provides
the application user with the following classification schemes:
Once the application user chooses a classification scheme, they can choose the colors used
to represent each class. For example, in a map showing temperature, red might be used to
indicate a high temperature and green a lower temperature. Often a gradation of colors, in
a color ramp, is used to represent the range of values shown on the map.
- Natural Breaks
- Equal Interval
To use this sample, you will need at least one map server object running on your
ArcGIS Server. Because of the way this sample uses the object, it must be configured
as a non-pooled object. This is very important. Use of a pooled object will modify the
pooled object running on the GIS server and potentially impact other client applications.
How to use:
Platforms: Windows, Solaris, LinuxMinimum ArcGIS Release: 9.0
- This sample is availabe as a web template at [install_location]\DeveloperKit\Templates\Java. Follow the
steps below to create an application from the template.
- Open a command window and navigate to [install_location]\DeveloperKit\Templates\Java.
- In the command window, type: arcgisant build
- In the dialog, type the name of your application. In this example, you can call it thematic.
- Type the name of the GIS server you want to use.
- Type the domain, username, and password of an account that has access to that GIS server.
- Click Connect.
- Choose the 'Thematic' template from the list.
- Choose a map server object from the list for the Map.
- Choose a map server object from the list for the Overview map.
- Click OK.
- You can navigate to [install_location]\DeveloperKit\Templates\Java\build\thematic to see your application.
Once created, you need to deploy your application. The deployment command will depend on the servlet engine you are using.
In this example, Tomcat is the servlet engine and the Web server's port number is 8080.
- Edit the common.properties file at [install_location]\DeveloperKit\Templates\Java with the path to Tomcat's webapp directory.
- Type the following command to deploy the application: arcgisant tomcat-deploy
- In the command window, type the name of your application. In this example,
it is named thematic.
- Stop and restart Tomcat.
- View your application in a Web browser.
- Design Time:
- Navigate to c:\inetpub\wwwroot.
- Create a folder called Thematic.
- Inside this folder, create 2 new folders: VBNet and CSharp.
- Navigate to <install location>\DeveloperKit\samples\Server_Development and unzip Thematic_SampleVBNet.zip or Thematic_SampleCSharp.zip, depending on your language preference.
- Copy the contents of the uncompressed file to the appropriate VBNet or CSharp folder created previously.
- Open the IIS Manager from Control Panel > Administrative Tools > Internet Information Services.
- In the console tree view on the left, navigate to Local Computer > Web Sites > Default Web Site.
- Expand 'Default Web Site' and navigate to the Thematic folder.
- To enable the C# version, select CSharp. For the VB.Net version, select VBNet.
- Right-click and choose Properties.
- On the Directory tab, click the Create button in the Application Settings section of this panel. Click OK to dismiss the Properties dialog.
- Launch Visual Studio .NET and open the Thematic project file (Thematic.vbproj or Thematic.csproj) located at c:\inetpub\wwwroot\Thematic.
- In the Solution Explorer, right-click Default.aspx and select 'Set As Start Page'.
- Set the Identity property for the Impersonation control on the Default.aspx page. The account you specify should be a member of the ArcGIS Server users account, agsusers. If your IDE doesn't provide any mechanism for setting the properties of this control at design time, you'll have to modify the Web.config file. For more information on impersonation, see the section titled 'Accessing a GIS server from a web application' in Chapter 5 of ArcGIS Server Administrator and Developer Guide.
- Set the Host property of the Map control to the name of your ArcGIS Server machine.
- Set the ServerObject property of the map control to the name of your map server object. Please Note: The selected ServerObject is required to be "Non-Pooled" in order for this sample to work properly.
- Set the DataFrame property of the map control to the particular data frame in the map you want to display.
- Set the Host, ServerObject and DataFrame properties for the OverviewMap control.
- Save the Project.
- Click the "Debug" drop-down menu and choose "Start".
- Address any errors that might occur in the debugging process.
- Run Time:
- Browse to viewer's URL
- Click Classify button.
- Select layer to classify.
- Select value field to use for classification.
- If desired, select field to use for normalization.
- Set number of classes to use in the classification.
- Set starting and ending colors to use in classification ramp by clicking on the color. Set the color in the pop-up color picker and click OK button.
- Click OK button.
Send feedback on this sample
||Describes the assembly and specify versioning information.
||Contains code for responding to application-level events raised by ASP.NET or by HttpModules.
||Code behind Global.asax.
||Error trapped displayed with user friendly messages.
||Code behind ErrorPage.aspx.
||User interface for displaying Thematic Viewer.
||Code behind Default.aspx.
||User interface for displaying Identify dialog window.
||Code behind Identify.aspx.
||User interface for displaying Classify dialog window.
||Code behind Classify.aspx.
||Class file containing classification code
||Style sheet being used by this sample.
||Application configuration files contain settings specific to this sample.
||The project file.