You could collect a bunch of "map-brushes" from around the web, or you could create them yourself. This would in principle apply to your software of choice, though I would strongly suggest vectorbased (Illustrator or Inkscape, as opposed to Photoshop and Gimp).
There are a number of online map generators for fictional worlds, there are also a plethora of brushes and sets of brushes that will give your map a defined "feel" (unfortunately, a lot of these seems to be pirate-treasure-map-style. Not what you are after, I take it).
In theory, you could programme and so generate maps with SVG, but to my (very limited) knowledge of this, it would hardly be worth the effort. Unless you are aiming for thousands of fictional maps...
And just to have it said: cartography is a highly specialised field, with its own set of rules and guidelines, so it is easy to work oneself into a maze. You could also look for techniques used for creating metro maps, they can be very helpful, and reveals some interesting things about cartography.
Take a look at this delightful blog that blogs about metro maps.
(Here is a tutorial basically explaining how to make brushes in Illustrator.
http://blog.spoongraphics.co.uk/tutorials/creating-road-maps-in-adobe-illustrator)