Roadway Reporter gets its map definition of which layers to use from a web map. Web maps can be authored and hosted in ArcGIS Online or an onsite deployment of Portal for ArcGIS.
There are three options for hosting a web map:
Authoring a web map in ArcGIS Online or Portal for ArcGIS
In ArcGIS Online and Portal for ArcGIS, you can add the data layers (map service) you intend to use, change the map extent, select a basemap from the basemap gallery, include a description of the map, and save the map as your own item for use in Roadway Reporter.
- Sign in to ArcGIS Online.
When you sign in to ArcGIS Online the first time, you need to create an account.
- Create a web map with the linear referencing capability in ArcGIS Online.
Add 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.
- Once you have created a web map and added all required layers, click Save.
- Provide the following information for the web map:
- Title
- Tags
- Summary
- Choose a folder in My Content to store the web map.
- Click Save.
- Make the web map publicly accessible.
Although the web map is shared publicly, 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, consider copying the web map from ArcGIS Online to the web folder on the web server that hosts the Roadway Reporter web app as a JSON file.
- Determine the web map ID; it will be used in other steps of the Roadway Reporter deployment process.
- Click My Content.
- Click the title of the web map to open its item details.
The URL for the item details web page is 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 Online as a local file
If you have an ArcGIS Online organizational account and your organization restricts members from sharing items outside the organization, you can copy the web map onto the web server.
- Open a web browser and enter the web map definition URL in the address bar. The URL for the 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 Online: https://www.arcgis.com/sharing/content/items/1dcf369089804329946e3b3abf385251/data?f=pjson.
- Copy the entire contents of the web page and paste it into a text file.
- Rename the text file with a .json extension.
You can use any name for the .json file.
- Copy the file to the web folder containing the Roadway Reporter web app on the web server.
For example, in Internet Information Services (IIS), the web folder may be located at C:\inetpub\wwwroot\RoadwayReporter.
The actual location of the IIS wwwroot directory may be different on your server machine. Use the IIS Management Console to get the location of the IIS wwwroot directory.
Authoring a web map as a local file on the web server
You can also author web maps directly by modifying the URL parameters in the sample web map in the Roadway Reporter web app.
- Browse to the sample web map at $INSTALL_DIR$\Server\Web\RoadwayCharacteristics\sample_webmap.json.
- Using a text editor, open the sample web map file (sample_webmap.json).
{ "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" }
- Modify the items in the operationalLayers configuration section as follows:
- Change the URL parameters to point to the URL of the map service with linear referencing capability that you published.
- Change the visibleLayers parameter to include the layer ID of the layers that you want to be visible by default.
- Copy the file to the web folder containing the Roadway Reporter web app on the web server.
For example, in IIS, the web folder may be located at C:\inetpub\wwwroot\RoadwayReporter.
The actual location of the IIS wwwroot directory may be different on your server machine. Use the IIS Management Console to get the location of the IIS wwwroot directory.
Vous avez un commentaire à formuler concernant cette rubrique ?