Authoring a web map

Web maps are used to deliver the content to be used within the Roadway Characteristics Editor web application. Depending on the type of security infrastructure of the ArcGIS server (public facing or behind a firewall) serving the data layers for the web map, the hosted location of the web map itself needs to be adjusted. There are two options for hosting the web map:

Authoring a web map is one of the steps (step 5 of 9) in the Roadway Characteristics Editor deployment process. Ensure that all steps prior to authoring the web map are completed before continuing with this workflow.

Hosting a web map on ArcGIS.com

Web maps can be authored in few simple steps using ArcGIS.com. You can choose to add data layers (map service) you intend to use, change the extent, select a basemap from the basemap gallery, include a description of the map and save it as your own item for use within the Roadway Characteristics Editor.

Steps:
  1. Log in to the ArcGIS.com web site.

    When you log in to ArcGIS.com for the first time, you need to create a global account.

  2. Author a web map using a map service with linear referencing capability on ArcGIS.com.

    Add at least one map service with linear referencing capability that contains the LRS network layers and the event layers as one of the layers in the web map. Optionally, you can also add basemaps or any reference layers as layers in the web map.

  3. Once you have created a web map and added all required layers, click Save.
  4. Enter the following information for the web map:
    • Title
    • Tags
    • Summary
  5. Choose a folder in My Content to store the web map.
  6. Click Save.

    See Saving web maps for more information.

  7. Make the web map publically accessible.
    1. Click Share.
    2. Check the Share with everyone (public) check box. See Sharing items for more information.

      Although the web map is shared publically, you can limit access to the map service with linear referencing capability by enabling ArcGIS Server security. If the ArcGIS server exposing the map services is behind a firewall, then consider copying the web map from ArcGIS.com to the web folder on the web server that hosts the Roadway Characteristics Editor web application as a JSON file.

  8. After the web map is created, you need to know the web map ID as it will be used in the other steps of the Roadway Characteristics Editor deployment process.
    1. Click on My Content
    2. Click on the title of the web map to open the item details .

      At this point, the URL for the item details web page will be in the following format: http://www.arcgis.com/home/item.html?id=<webmapID>. The web map ID is the 32-character string at the end of the URL.

Copying a web map from ArcGIS.com to a web server

Prerequisite:

A web map has to be created prior to copying it from ArcGIS.com to a web server. If you do not have a web map saved already, please follow the steps to host a web map in ArcGIS.com.

Your organization may restrict members from sharing items outside the organization. If this is the case then consider copying the web map on a webserver.

Steps:
  1. Open a web browser and enter the web map definition URL in the address bar.

    The URL for web map definition should have the following syntax: http://www.arcgis.com/sharing/content/items/<your web map ID>/data?f=pjson

    For example, the following URL retrieves the web map definition for the New York sample data hosted on ArcGIS.com: http://www.arcgis.com/sharing/content/items/1dcf369089804329946e3b3abf385251/data?f=pjson.

  2. Copy the entire content from the web page and paste it into a text file.
  3. Rename the text file to have a *.json extension.

    You can use any name for the *.json file.

  4. Copy the file to the web folder containing the Roadway Characteristics Editor web application on the web server.

    For example, in IIS, the web folder may be located at C:\inetpub\wwwroot\RoadwayCharacteristics.

    The actual location of the IIS wwwroot directory could differ on your server machine. Use the IIS Management Console to get the location of the IIS wwwroot directory.

Hosting a web map on a web server

As an alternative to authoring the web map using ArcGIS.com, you can author web maps directly by modifying the URL parameters in the sample web map that can be found within the Roadway Characteristics Editor web application.

Steps:
  1. Using Windows Explorer, navigate to the sample web map at $INSTALL_DIR$\Server\Web\RoadwayCharacteristics\sample_webmap.json .
  2. Using a text editor, open the sample web map (sample_webmap.json) file.

    {
      "operationalLayers": [{
        "id": "LRS_map_service",
        "title": "LRS map",
        "url": "http://roadsandhighwayssample.esri.com/ArcGIS/rest/services/RoadsHighways/NewYork/MapServer",
        "visibleLayers": [ 0, 1, 2, 3 ]
      }],
      "baseMap": {
        "baseMapLayers": [
          {
            "id": "World_Light_Gray_Base",
            "url": "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
          },
          {
            "id": "World_Light_Gray_Reference",
            "isReference": true,
            "visibility": true,
            "url": "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"
          }
        ],
        "title": "Basemap"
      },
      "version": "1.6"
    }

  3. URL parameters let you define the contents of a map, for example the basemap, operational layers, and the extent.
  4. At the minimum, some the items within within the "operationalLayers" configuration section need to be modified to use your data.
    1. Change the "url" parameters to point to the URL of the map service with linear referencing capability that you have published.
    2. Change the "visibleLayers" parameters to include the layer ID of the layers that you would like to have visible by default.

    For more information on authoring a web map, see Using URL parameters.

  5. Copy the file to the web folder containing the Roadway Characteristics Editor web application on the web server.

    For example, in IIS, the web folder may be located at C:\inetpub\wwwroot\RoadwayCharacteristics.

    The actual location of the IIS wwwroot directory could differ on your server machine. Use the IIS Management Console to get the location of the IIS wwwroot directory.


12/19/2012