Thematic Sample


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.
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.

Server: VB.NET, C#, Java

Platforms: Windows, Solaris, Linux

Minimum ArcGIS Release: 9.0

How to use:
  1. 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.
    1. Open a command window and navigate to [install_location]\DeveloperKit\Templates\Java.
    2. In the command window, type: arcgisant build
    3. In the dialog, type the name of your application. In this example, you can call it thematic.
    4. Type the name of the GIS server you want to use.
    5. Type the domain, username, and password of an account that has access to that GIS server.
    6. Click Connect.
    7. Choose the 'Thematic' template from the list.
    8. Choose a map server object from the list for the Map.
    9. Choose a map server object from the list for the Overview map.
    10. Click OK.
    11. 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.
    12. Edit the file at [install_location]\DeveloperKit\Templates\Java with the path to Tomcat's webapp directory.
    13. Type the following command to deploy the application: arcgisant tomcat-deploy
    14. In the command window, type the name of your application. In this example, it is named thematic.
    15. Stop and restart Tomcat.
    16. View your application in a Web browser. http://myserver:8080/thematic/index.html
[VB.NET, C#]
  1. Design Time:
    1. Navigate to c:\inetpub\wwwroot.
    2. Create a folder called Thematic.
    3. Inside this folder, create 2 new folders: VBNet and CSharp.
    4. Navigate to <install location>\DeveloperKit\samples\Server_Development and unzip or, depending on your language preference.
    5. Copy the contents of the uncompressed file to the appropriate VBNet or CSharp folder created previously.
    6. Open the IIS Manager from Control Panel > Administrative Tools > Internet Information Services.
    7. In the console tree view on the left, navigate to Local Computer > Web Sites > Default Web Site.
    8. Expand 'Default Web Site' and navigate to the Thematic folder.
    9. To enable the C# version, select CSharp. For the VB.Net version, select VBNet.
    10. Right-click and choose Properties.
    11. On the Directory tab, click the Create button in the Application Settings section of this panel. Click OK to dismiss the Properties dialog.
    12. Launch Visual Studio .NET and open the Thematic project file (Thematic.vbproj or Thematic.csproj) located at c:\inetpub\wwwroot\Thematic.
    13. In the Solution Explorer, right-click Default.aspx and select 'Set As Start Page'.
    14. 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.
    15. Set the Host property of the Map control to the name of your ArcGIS Server machine.
    16. 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.
    17. Set the DataFrame property of the map control to the particular data frame in the map you want to display.
    18. Set the Host, ServerObject and DataFrame properties for the OverviewMap control.
    19. Save the Project.
    20. Click the "Debug" drop-down menu and choose "Start".
    21. Address any errors that might occur in the debugging process.
  2. Run Time:
    1. Browse to viewer's URL
    2. Click Classify button.
    3. Select layer to classify.
    4. Select value field to use for classification.
    5. If desired, select field to use for normalization.
    6. Set number of classes to use in the classification.
    7. 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.
    8. Click OK button.

VB.NET C# Java
File Description
AssemblyInfo.vb Describes the assembly and specify versioning information.
Global.asax Contains code for responding to application-level events raised by ASP.NET or by HttpModules.
Global.asax.resx .
Global.asax.vb Code behind Global.asax.
ErrorPage.aspx Error trapped displayed with user friendly messages.
ErrorPage.aspx.resx .
ErrorPage.aspx.vb Code behind ErrorPage.aspx.
Default.aspx User interface for displaying Thematic Viewer.
Default.aspx.resx .
Default.aspx.vb Code behind Default.aspx.
Identify.aspx User interface for displaying Identify dialog window.
Identify.aspx.resx .
Identify.aspx.vb Code behind Identify.aspx.
Classify.aspx User interface for displaying Classify dialog window.
Classify.aspx.resx .
Classify.aspx.vb Code behind Classify.aspx.
Classification.vb Class file containing classification code
Styles.css Style sheet being used by this sample.
Web.config Application configuration files contain settings specific to this sample.
Thematic.vbproj The project file.
Thematic.vbproj.webinfo .

Feedback Send feedback on this sample