DASH - Customization


Adding Localized data to the BaseMap


The DASH application is provided with National scale data sets. The BaseMap document is provided to get your started with an application that has the minimum level of content required to work with the national level observation networks. However, it is the intention that you will customize the application for your locale.

Hopefully you have GIS data which is more specific to your local region which you will want to add to the BaseMap.




Changing the Default extents


The default behavior for the application when it is first launched is to zoom to the union of the initial extents of all the map services. If you want to change the initial extent, you have two options:


  Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.PreRenderComplete
    ' If no tasks have been defined, hide the tasks panel
    If TaskMenu.Items.Count = 0 Then Tasks_Menu_Panel.Visible = False
    ' check to see if any of the resource items are non-pooled
    If Not Page.IsCallback Or Not Page.IsPostBack Then
      CloseHyperLink.Visible = HasNonPooledResources()
      Dim ov As OverviewMap = Page.FindControl("OverviewMap1")
      If Not ov Is Nothing Then
        If Not OverviewMapResourceIsValid(ov) Then
          ov.OverviewMapResource = Map1.PrimaryMapResource
        End If
      End If
       Map1.Extent = New ESRI.ArcGIS.ADF.Web.Geometry.Envelope(-117.268, 32.71, -116.961, 32.91)     
    End If
    CopyrightTextHolder.Visible = HasCopyrightText()
  End Sub 'Page_PreRenderComplete





Caching your service


Setting up a Second DASH

DASH is so much fun, that sometimes you can't have just one. Here are quick instructions for setting up a second DASH.

In windows explorer:

In IIS manager:

Expanding the Map Contents Window by Default

The Map Contents window shows the layers and symbology in your map. It is not expanded by default in order to save space on the screen. You can set the default behavior for this by editing default.aspx in the DASH code, and then recompiling the code.

To expand the Map Contents window by default:
  1. Start Visual Studio 2005.
  2. Click File, point to Open, and then click Web Site.
  3. Make sure Local IIS is selected on the left, and then browse to DASH, and click Open.
  4. Once the DASH source code loads, open default.aspx by double clicking it in the project explorer.
  5. If you do a search for "map contents" in that document, it should take you to the part of the code that begins with a comment that looks something like <!- TOC ... Map Contents ->.
  6. In the esri:FloatingPanel element, you'll see an attribute called Expanded, with a value of "False". Change this to "True".
  7. To set the height of the Map Contents window, in the esri:FloatingPanel element, you'll see an attribute called Height, which has a value of something like "150px". Change this to something bigger, like "450px".
  8. To set how deep the expanded items go (do you show legends for top level layers, or for all grouped items, etc.), in the esri:Toc element, which is a child of the current esri:FloatingPanel element, you'll see an attribute called ExpandDepth. To show the symbols for the first level of map layers, give that attribute a value of "2". You get the idea.
  9. Press Ctrl-Shift-B to build the solution.
  10. Open a browser, navigate to your DASH, and make sure the Map Contents window is expanded. If you do more code adjustments and recompile, it's best to close your browser and open a new one in order to see the changes that you made in the code.

Note: You can also change these settings by changing the properties of the Map Contents window and the TOC is contains, from the Designer view. To do so, right click on default.aspx and click View Designer. Then left click on the Map Contents window to select it, and now the properties (such as "Expanded") should be visible in the Properties window.