Select to view content in your preferred language

Make Railroad Line Symbols in the ArcGIS Online Map Viewer

2873
10
08-14-2024 05:43 PM
JimBarry
Esri Regular Contributor
2 10 2,873

********* BLOG ARTICLE UPDATE, JUNE 23, 2025

The ArcGIS Online Map Viewer now contains railroad line symbols. Just go into the Properties of your line layer, there are now different kinds of railroad symbols under the "Transportation" symbol set. 

JimBarry_0-1750704130888.png

 

Thanks to @CameronRex1 for pointing that out.  For more information, see @CameronRex1's note in the Comments section below.

So, in short, to make railroad symbols, you no longer need to jump out into ArcGIS Pro to do so, as the article below suggests. 

That said, I'm going to leave this article and its steps up, because, as @BryanBoutz1 commented below, these techniques can still be used to add certain symbols to web maps that may not yet be available to the ArcGIS Online Map Viewer.

********************************

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!

 

10 Comments
LindsayRaabe_FPCWA
MVP Regular Contributor

Nice work around. To clarify, Steps 2 & 3 would be the same as opening ArcGIS Pro then opening the webmap from your Catalog's Portal connection (which is how our staff typically find data from ArcGIS Online). 

Being able to modify a webmap this way though is a new concept for me and something I'm keen to try when the situation undoubtably arises!

BryanBoutz1
Occasional Contributor

I've found that editing symbology and then publishing or updating an existing webmap is the secret to many cool cartographic tricks in ArcGIS Online.  Online now supports a rich cartographic information model (CIM) but the Map Viewer does not provide as many options, tools, and presets for manipulating symbology.  It appears that this is one of the drivers of the license structure changes that have been happening recently. In other words, to be an ArcGIS Online expert, you need to be comfortable in ArcGIS Pro.

JimBarry
Esri Regular Contributor

@BryanBoutz1 Yeah, that's exactly right.  Well put.  The mapview display supports the CIM to the degree that the ArcGIS JS SDK does, but the UI in the map viewer itself that gives users symbol configuration options, doesn't yet give users full access to everything the mapview can do.  I happened to trip upon that with this railroad use case, but I bet it's possible to do a lot more with it, simply using ArcGIS Pro to sort of "unlock" those features.  

JimBarry
Esri Regular Contributor

@LindsayRaabe_FPCWA Nice!  Great point about steps 2 and 3. Thanks for that.

>>  is a new concept for me

Me too!  I actually just tripped up on it by mistake, and was pleasantly surprised when it worked.  I do a lot of railroad mapping, so you bet I'll be doing this going forward.  Esri does have an enhancement request in the hopper to add a railroad symbol to the "Style" UI in the online map viewer, but until then, this seems to work ok so far.

LindsayRaabe_FPCWA
MVP Regular Contributor

So, based on this, I would assume that when publishing a new feature service from ArcGIS Pro, the more complex symbology would also be honoured and then tweakable in ArcGIS Online. 

As for modifying existing feature service symbology, without having to resort to a republish of the layer from ArcGIS Pro, you would need to go through the process above and then Save the feature service in the map (or "Save as" as a new layer) to be able to add it to other maps. 

LindsayRaabe_FPCWA_0-1723769964121.png

 

JimBarry
Esri Regular Contributor

@LindsayRaabe_FPCWA 

>> I would assume that when publishing a new feature service from ArcGIS Pro, the more complex symbology would also be honoured and then tweakable in ArcGIS Online. 

I would need to try this some more in different ways with different symbology to see what kinds of things get preserved and which do not, or do so partly.  For now, I've only been using symbology saved with the web map, and not yet symbology saved with the hosted feature service layer itself.  To be candid, I typically save symbology with the layer because the layers I work with, I typically want symbolized the same way.  I do this by going to the hosted feature layer's item page, go to the Visualization tab, then set it up and save it that way.  Then the layer will start with the same preferred symbology when brought into any way, like you said.   All I've learned so far is that the online map viewer's map display supports more symbol options that the map viewer's UI allows you to select.

Thanks for the extra info there about saving it with the layer, so that it then that becomes the default symbology when added to other maps.  This is fun stuff.

 

AndresCastillo
MVP Alum

This method of adding the web map item ID to the Pro content pane, then configuring the desired symbology in Pro, then either publishing, or overwriting the web map, also works with custom dictionary mobile/web styles.

In the web map item_data json (viewable in ArcGIS Assistant), new key-value pairs are added to the renderer key, which enables the symbology to be rendered within the web map.

JimBarry
Esri Regular Contributor

That's great @AndresCastillo , thanks for sharing that! 🙂

CameronRex1
Occasional Contributor

@JimBarry There’s actually a much easier way to create and use custom railroad line/point (or polygon) symbols in both ArcGIS Online Map Viewer and Portal Map Viewer, especially if you're already working with ArcGIS Pro. If your Custom Symbology is common between projects, then it will always be available in ArcGIS Online or Portal.

Custom Symbology Workflow Using ArcGIS Pro & Web Styles:

  1. Create your custom symbology in ArcGIS Pro.

  2. For each symbol click the hamburger menu (top-right) in the Symbology pane and choose "Save Symbol to Style" and save to a Custom Style.

  3. After saving all your custom symbols, go to the Catalog pane > Styles, right-click your custom style, and select "Share as Web Style" to publish to your Portal or ArcGIS Online.

  4. (Optional but recommended) Share the style with a dedicated Symbology or Style Group for easier access and organization-wide use.

🖌️ Using Custom Styles in Map Viewer:

  1. Add your feature service to Map Viewer.

  2. Open Styles > Style Options > Pencil icon > Click the arrow next to the current symbol.

  3. If you haven’t added your custom web style yet, click “+” next to Change Symbol, then select your Shared Custom Style.

  4. If already added, use the Category dropdown, scroll to “Added styles”, and pick your custom style.

Now your custom symbols from Pro are available directly in the web map!


💡 Bonus Tip: Symbolizing by Multiple Fields in Map Viewer

The Map Viewer doesn’t currently support unique symbols by multiple attributes out of the box, but here’s a workaround:

  1. Use an Arcade expression, such as:
    "AssetType + '-' + Inspected"
    to combine fields.

  2. Map Viewer will only show combinations that already exist in your data.

  3. To ensure all possible combinations appear in your symbology options, temporarily add features representing each desired pair (e.g., Switch/Yes, Switch/No, Signal/Yes, Signal/No, etc.).

  4. Assign your desired symbology to each and save your map, then delete the temporary features.

If anyone’s interested, I’d be happy to put together a step-by-step guide with screenshots.


📌 One More Note:

It looks like ArcGIS Online has recently added a built-in railroad line symbol under the "Transportation" category, which is great to see. However, this does not appear to be available in ArcGIS Enterprise Portal (as of version 11.3).

JimBarry
Esri Regular Contributor

That's great to know!  If you don't mind, I'm going to make an edit to the top of this article and mention your comment here.

Contributors
About the Author
https://x.com/jimbarry