Friday, April 20, 2007

Drawing Maps with Illustrator

I did a fun little project this week that I’ve done a few times before, but this time I thought I’d write up a little tutorial on it to share. I’ve you’ve done any amount of graphic design, you’ve probably had to draw maps, maybe as directions to an event or office. Illustrator has some cool features that come in handy for this type of illustrated map. The map I’m doing here is pretty simple, but using these techniques, you can go as fancy and stylized as you want. Maybe when I have time I’ll update these images to show alternate styles.

Find your source map – a real map that you can trace. (cough*google*cough)

Scan it, or grab a screen shot and paste it into your Illustrator document as a template. Place it where you want it, and lock the layer.

Create a new layer for your roads. You may want to have a couple layers, one for major roads, one for minor roads, one for highways, etc. Trace the roads you want to show on this layer, using the line and pen tools. It helps to draw these paths in a color that contrasts with your map so you don’t give yourself a headache looking at all those lines.

Tip – to make it easier when you add the labels to these roads, pay mind to the direction you draw them in. Start to the left and work your way towards right. This will make your path go in the direction your text should go. Draw your strokes down the center of where the road should be. Pay attention to street names you’re tracing and try to use one path per street, this will make it easier to label them later. If you draw multiple streets with a single path, you’ll have to break them up later.

If you’re tracing several roads, you may want to style them differently. Once you have your major roads traced, lock the layer, and create another for minor roads. You will probably want this one under your major roads layer. Keep each set of roads on its own layer for easy access.

You can style the roads a couple ways. Brushes work well for complex styles. To define a custom brush, draw the shape you want to represent your road, select it, and then hit the “new brush” button in the brushes palette, or drag it into the brushes Palette. Choose “Art Brush” as the type of brush. This will tell Illustrator to stretch the shape you’ve drawn over the length of the path. You can also adjust the scale of it later if you decide you want your roads wider. Because we’ve separated our major and minor roads onto different layers, you can define separate brushes for each.

An alternate way to style the roads is to customize the stroke for the road – make it wider and apply a color. You don’t have as much flexibility or styling options as you do with creating a brush, but this makes it easier to flatten the roads later. After you're done, you’ll want to expand the appearance of the brushes, or strokes. Another reason we made a backup of those layers!

Make the stroke wide as you wish the road to be:

Color it to match the road:

Expand the path:

Add desired borders:


Duplicate your first road layer to keep a backup (you’ll need it later - lock it and turn its visibility off to get it out of the way), then apply the brush you created for major roads to those paths, or style those paths with your desired strokes. Do the same for all other road layers – keeping a copy of the original paths for each. You can turn the visibility of your traced template layer on and off to see how it looks.

Once you’re done, you may notice that the intersections of the roads may look a little funky from your brushes or strokes, and that any borders around the road lines cross over eachother rather than intersecting.


To fix this, we'll use the Pathfinder to add the shapes together for the desired effect. This is much simpler with strokes than it is with brushes, another reason to use a stroke if you can. With strokes, you can select all of the expanded strokes, hit the “add” button, and you’re done. With brushes you’ll have to carefully expand the appearance of each, and add them together one at a time.

Much better!

Now we’re going to add labels. Create another copy of your backed up road path layers, this one will be where we add the text labels. Using the text tool, add street names to each road path. You can use the baseline adjustment on the Character palette to align the text it where you’d like it to appear in relation to the road path. Drag the slider handles around the text with the arrow tool to position the text where you want it, or flip it to the opposite side of the path.

Insert text along the path:

Adjust the text style and baseline:

Drag the text to the desired location:

As you can see from these screen shots, I'm turning the visibility of the template on for reference and off for clarity.

Once all of your roads are labeled, you can draw in icons, placemarks, pushpins and landmarks. These all go on separate layers for convenience. If you want to use lots of cute little landmark or interstate icons, create symbols from your icons for easy duplication and editing.

Here’s my finished map…directions to my office! Now I know this article was cool, please try to refrain from stalking me.

14 comments:

Anonymous said...

Thanks so much! We were trying to figure out how to make the roads intersect and this really helped!

Ann Teaff said...

sweet! I've been looking to do this for some time and your tutorial helped a ton!

thanks for sharing!

pw
nashville, tn

Unknown said...

I came across your blog and wanted to thank you for sharing the info. I have to create a map of a city with 100+ landmarks on it. I have never created maps in Illustrator. Before I undertake the task, do you have an estimate as of how much time it would take? Is Illustrator the best option for this task?

thanks a lot.

Z.

Rae said...

@zamfira - Illustrator will be a fine option for creating a map if you need it to be done in an "illustrative" style. That is, if you need to add graphic enhancement, or only show certain roads and landmarks. However if your mapping needs are data-intensive, there may be a better tool for you. I've worked a lot with Microsoft MapPoint which makes mapping data very easy. In a previous position, we used MapPoint to map locations where we had done construction work, we also used it to analyze where our jobs were and where the best jobs were. You can import a spreadsheet/CSV of addresses or GEO points and MapPoint will place "pushpins" on the map in every location. MapPoint does allow you to create custom pushpin symbols (although they have to be 8-bit BMP if I remember correctly), so you can create different symbols for different landmarks.

You are probably aware of how sophisticated tools like Google Maps and Windows Live Local (maps) have become - many allow you to add placemarks. But just in case, I thought I'd mention that :)

Lastly, if Illustrator is truly what you need to use to create a complex map, a lot of the work involved will depend on how good your data is and how much time it will take you to do all those place marks. Drawing all those roads can take awhile, and I'm guessing if you have 100+ landmarks to add, you are covering a large area. So I would allow a couple hours just for drawing roads. For your landmarks, you'll want to use Illustrator's symbols feature to manage the different landmark icons, then you can use the Symbol Sprayer to easily place them all over your map...or just drag them from the symbol palette to your map. Again, the time involved here depends on how difficult it will be for you to find your landmark locations - just clicking to place them on the map is easy. I'd probably allow a couple hours for that as well.

Of course this also depends on your comfort level with Illustrator's tools, and the level of detail and precision you need. I do know that Illustrator is the preferred choice among professional map artists (cartographers?) for drawing maps, and it certainly has the power to do so. But in the interest of time and depending on the purpose of your project, a data mapping tool might be better.

HTH!

Samuel John Klein said...

I'll have to try this with strokes. I tried the brush approach and it was actually impossible.

Whenever I added two brushed lines together, they combine to create an odd new shape. Not what was wanted at all!

Yes, I did try adding just two brushed lines together–did not try to add together all lines at once.

Your explanation is very clear, but it's like i"m missing something here.

Unknown said...

I was just wondering if you had any tips on combining the shapes of the major and minor roads so that they have no lines going across them as you did with the major roads.

I tried to use pathfinder and it didn't work as you'd described.

Everything else was brilliant.

Unknown said...

As a small ps.

How in God's name do you get the text to align that straight?

Mine always looks lumpy.

Rae said...

@Samuel and @Charlie ... Good questions! In both cases, I would suggest putting strokes and fills on separate layers. The steps would go like this:

Draw your paths/roads
Save a copy of that layer as a backup, name your working layer "fills".
On your working copy of the Fills layer, set the stroke widths you needed for each road type.
Outline the strokes of the Fills layer.
Duplicate the fills layer and call it Strokes.
Lock and hide the Fills layer.
Use the pathfinder to Merge and Expand the Strokes layer. They should all be one shape, apply NO fill to this layer, and the strokes that you want. Note that this means all your roads must share the same type of stroke.
Lock and hide this layer, switch to the Fills layer.
Apply the desired fill color to each road on the Fills layer, with differing colors for major/minor roads. You may want to adjust the stacking order so major roads are in front and minor roads are in back.
Turn the visibility of the Strokes layer back on, and you should get the desired appearance.

What we're doing here is simply putting the outlines on a separate layer from the fills, which allows us to have fills that intersect with no borders.

If you're using a brush, this really depends on what the brush looks like. But most likely the simplest way to use a brush would be to keep the "fill" part of the road as a stroke, and then apply the brush to the borders.

Lastly, for the best results with the text on a path, try to keep the line as straight as possible. If you have curvy roads, this can be challenging. If that's your issue, then you might consider styling the map without the road names traveling along the paths, and just listing them horizontally next to the road.
You may also want to check your Type on a Path Settings. Double click the Type on a Path Tool. There are a few options for the Effect that control how the text aligns to the path. My settings for the Effect are for "Rainbow", and if you choose "Baseline" for "Align to Path" you may also not need to adjust the baseline to center the text over the path.

Anonymous said...

is there a way to get the stroke back ? when you use text on a path, your stroke disappears....how do you add the stroke back while text remains as well?

Unknown said...

Another way of fixing intersections is using 2 layers:
- One to hold the road borders (e.g. thick black lines).
- Another one on top of that to hold the road centerlines (thinner yellow or white lines).

And then usually another set of layers to deal with roads physically going under other objects (in the case of overpasses and interchanges)

Illustrator is indeed a very popular choice amoung cartographers (I use it as my main mapping tool and wouldn't want to live without it), often combined with a plug-in called MAPublisher, which allows you to import existing geographic data and assign Illustrator styles based upon the data attributes.

I don't really want to spam here, but there is a very useful forum for cartographers (including many cartographers using Illustrator): Cartotalk

Anonymous said...

Very slick. Great advice, especially about the stroke and pathfinder features. I now feel confident that I can create a quality map with Illustrator relatively quickly. Thanks very much.

Anonymous said...

Hi Rae,

I am from a4trip.com, which located in Malaysia. We created and selling travel guidebooks for various destination around the world. We are looking for map illustrator for our guidebook. This project is on profit sharing basis, where once the guidebook is ready for sale, you will recieve a royalty fees for every single copy sold. Do let me know if you are interested. Hope to hear from you soon. Thanks. Have a great day! :)

Regards,
Agnes
support@a4trip.com

Anonymous said...

Great Tutorial on how to use Pathfinder to create connecting Roads!
In Illustrator CS4 there's a new, simpler way to do this. With the new Blob Brush, you can draw mulitiple roads, and the intersections will automatically merge. The trick is they need to be the same color FILL, with NO STROKE. (You can always apply a stroke later.)
You can use the bracket keys to increase, decrease the diameter, or double click on the Blob Brush in the tool panel to set diameter. You can also use the shift key with the Blob Brush to constrain your Blob Brush path to a straight line.

Dave said...

fantastic... the pathfinder trick just saved me a LOT of time! Much appreciated!

Dave