That kind of line is not terribly straightforward in Photoshop. In my opinion, you're better off going to Illustrator, or perhaps Inkscape, for that kind of thing. I know it's fairly easy to set it up in Illustrator, but I've only used the very basics of Inkscape, so I couldn't give you any guidance there.
That said, it is possible in PS: Start by using the Pen tool or Freeform Pen tool to draw a path for your line. Then stroke it with a solid brush in the color you desire for your line on an empty layer. Make a new brush that is two vertical lines at the width of the smaller dot you desire in your line. Go to the Eraser tool and load up your new brush. Adjust the spacing so that it will hit at the frequency you desire, set the angle jitter to direction, and stroke the path with the eraser.
In case you're not familiar with the Paths feature in Photoshop: Before you draw your path go to the Paths palette, which should be behind the Layers and Channels palettes, and click the New button. This will ensure that you do not accidentally replace or add to any existing path when you make a new line. If there is already a work path there, drag that one to the New button first so you can save it for later if you need it. I suggest you keep a separate path for each line in case you want to adjust things later on or use slightly different settings for a given line. A path can be edited with the Direct Selection tool, but any strokes you've made will have to be erased and re-done if you decide to move or reshape the path. To perform the stroke, set up your brush with the brush tool selected, then go back to the Pen tool and right-click your path. Choose Stroke Path... from the context-menu, and you'll get a window with a drop-down box where you can select which tool you want to stroke it with. The tool you use will use the brush you most recently set up when you had that tool selected.
In custom brushes you can pick a square brush, and with scatter to 0% you can set spacing to a fitting distance and paint a line or stroke a path in PS.
It is easier however to make the path in illustrator, copy it and paste it in PS afterwards... That of course require that you know how the path should be.
Easier then to import the map into illustrator and draw the lines there
No, the first "hint" was for Photoshop - the other two for Illustrator ... So you can make a dotted line in photoshop without having to delete.
Glad it's working for you. If you want to get really picky with it, you can make the edges rounded by sculpting the eraser brush a bit. Obviously, its shape will be a negative of the shape you want the line to have.
pick a square brush, then under "brush tip shape" set the spacing to 200%. Then just draw a line. If you want the squares to follow the line instead of all being a 0 degrees, you need to click "shape dynamics" on and under "angel jitter", set control to "direction" and jitter to 0%.
never thought of doing this with PS. good idea havin the 'negative' stroke on top of a solid stroke to get the effect. will need to try this out.
Fantastik idea. Have to give it a try too.