Make Railroad Line Symbols in the ArcGIS Online Map Viewer

246
6
Wednesday
JimBarry
Esri Regular Contributor
1 6 246

You may have noticed that the ArcGIS Online Map Viewer does not have any typical railroad symbols. You know, line symbols like these, that have a single line with a series of perpendicular cross hatches along its length.

rail-line-pro.JPG

 

When you make maps in both ArcGIS Pro and in the ArcGIS Online Map Viewer, you will find that the cartographic tools in ArcGIS Pro to be much more extensive, exhaustive, and flexible, than those you will find in the online map viewer. And in a way, that makes sense, and fits the general expectation that working with a web app in a browser will usually have lighter weight tools and limited capabilities when compared to a more heavy duty workstation application like ArcGIS Pro.

At any rate...

Making railroad maps using online tools, puts us in a position where we're asking "If it only had this one... more... thing..."

So is there a way around this? Yes! There is a way to work with railroad line symbols in the ArcGIS Online Map Viewer.

 

First, let's see what the ArcGIS Online Map Viewer has. When you are choosing a line style for your railroad tracks layer, it will look something like this:

arcgis online line symbol optionsarcgis online line symbol options

 

In the Layers view on the left tool bar, you would click "Show properties" on the Tracks layer, then drill in on the right panel to get to the "Symbol style" popup panel. Then at the bottom of this panel is a pull-down option for "Pattern". If you click that open, you'll see a small variety of solid, dotted, and dashed line symbols, but there are no options that provide any of the typical "railroad" type of line symbols, that draw with either a single or double line, with periodic perpendicular hash marks.

solid, dotted, dash line patternssolid, dotted, dash line patterns

 

As it turns out, just because the railroad line symbol we want to use isn't choosable through the popup panel doesn't mean that the web map doesn't support it. Here I'd like to describe a technique for using railroad symbols in an online web map.

 

STEP 1

Once you've published all of your layers as feature services, use the ArcGIS Online Map Viewer to add them to a new web map, set the symbology the way you want. For the track symbol, you can just choose the simple solid line for now. We will fix it later. Then save the web map, like this:

make web map in arcgis onlinemake web map in arcgis online

 

STEP 2

In ArcGIS Online, go to your "Content" tab to find and open up the item page for your new web map. Over on the right, click the button that says "Open in ArcGIS Desktop > Open in ArcGIS Pro", like this:

open-in-pro-3.jpg

 

This will create an "item.pitemx" file in your Windows Downloads folder. This "PITEMX" file contains all of the information needed so that you can open the online web map in ArcGIS Pro, in a way that maintains a link to the original web map it was created from.

 

STEP 3

Check your Windows Downloads folder to find a new file called "item.pitemx", or something similar. Check the date/time stamp to ensure you're working with the correct one. Double-click this file, which will open your web map in ArcGIS Pro.

item-pitemx-3.jpg

 

And this is what your web map will look like in ArcGIS Pro.

web map opened in proweb map opened in pro

 

The neat thing about this, is that the "item.pitemx" file has information that maintains a link between the work you do here in ArcGIS Pro, and the web map stored back in ArcGIS Online.

 

STEP 4

Now that your online web map is open in ArcGIS Pro, go ahead and change the symbology of the track layer to use the Railroad symbol. The default color is gray, and it has a default thickness, and default length of the hash lines.

choose railroad symbolchoose railroad symbol

 

But in the Symbology pane, you can toggle over to the "Properties" tab (in green below) to change the color, length, and width of the track lines and the hash lines. Totally up to you. As you can see, there are many other symbol settings you can add, remove, change, and control, but we'll move on.

advanced symbols in proadvanced symbols in pro

 

STEP 5

Let's save these symbology settings back to the online web map. To do this, go up to the ribbon's "Share" tab, and click the tool called "Save Web Map", and when prompted in the popup dialog, click "Save web map" again, like this:

save web mapsave web map

This will open the "Save Web Map" tool pane. Fill it out as you see fit, and when you're ready, click "Analyze", and then "Save". If clicking "Analyze" creates errors or warnings, you will need to sort those out, depending on what they are.

analyze and save web mapanalyze and save web map

 

STEP 6

Once the "Save Web Map" tool works successfully, go back to your web map, back in the ArcGIS Online Map Viewer, and you'll see that the railroad line symbol you setup looks the way you configured it back in ArcGIS Pro.  The changes may not appear automatically.  You will need to refresh your browser, or close and reopen the web map.

back-in-agol-4.JPG

 

Additionally, if you want to modify the railroad line symbol some more, you can. If you open up the layer's "Properties > Styles" pane again, you'll see options for resetting the properties for both parts of the line symbol: the "solid stroke" and the "vector marker".  These symbol setting options were not available before.  They only become visible after you use ArcGIS Pro to change the line symbol, in this case, to a railroad symbol that uses both a line and a marker.

back-in-agol-3.JPG

 

IN CONCLUSION

These steps are working pretty well for me, but I'll admit, this workaround is a long way to go until the day railroad line symbols are included in the list of styles you can choose from within the map viewer.

Let me know if you think there might be an easier way to do this. No doubt I could be missing something. Thanks for your time!

 

6 Comments
About the Author
https://x.com/jimbarry