Make Railroad Line Symbols in the ArcGIS Online Map Viewer

248
6
Wednesday
JimBarry
Esri Regular Contributor
1 6 248

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
LindsayRaabe_FPCWA
Regular Contributor II

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
New Contributor III

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
Regular Contributor II

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.

 

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