Help Wikitravel grow by contributing to an article. Learn how.

Wikitravel:How to draw a map

From Wikitravel

(Redirected from How to draw a map)
Jump to: navigation, search

The following is about drawing your very own map completely from scratch. For instructions on turning already publicly available OpenStreetMap data into Wikitravel maps, see Wikitravel:How to create a map.

In this age of satellite imagery, you no longer need to be a professional cartographer to draw an accurate map. The following instructions are for creating standard Wikitravel maps using Inkscape (a free image-creating program available for most operating systems). The process using other drawing tools is similar.

[edit] Overview

The process is fairly straightforward.

You start by tracing the geography of the place and the courses of the streets etc., as "vectors". These are shapes that can be zoomed in and out without them getting pixelated, and they are saved in a file format called SVG (Scalable Vector Graphics).

When the geography and street plan are drawn, you add labels to identify what's what, colored symbols that correspond to the listings in the article, and a key that identifies which is which.

The Inkscape logic is to build different vectors, icons and text labels in different layers, and within each layer to have a structure of different objects. Both layers and objects within each layer, can be simply moved up and down in the hierachy of your file.

When it's finished, the file is output from SVG to PNG (Portable Network Graphics), a bitmapped file format that all web browsers can display. Then both versions are uploaded: one for future editors to update (SVG), and the other to include in the article (PNG).

[edit] Map making tools

A map of the West End of Washington, D.C. — created by a complete amateur using the instructions below
A map of the West End of Washington, D.C. — created by a complete amateur using the instructions below

You will need some tools in order to build maps. The most critical is a vector-based drawing tool and preferably Inkscape, capable of producing SVG-format files.

  • Inkscape [1] is an open-source (free) tool, for Windows, Mac OS X, and Linux. Please use the most current version, to avoid compatibility issues.

Other vector-based drawing programs (eg Adobe Illustrator [2], CorelDRAW [3], Sodipodi and Freehand) can be used, but this article deals with drawing maps using Inkscape.

  • A bitmap image editing tool is not necessary, but is handy for any post processing work you want to do on the PNG-format version after your map is generated, such as cropping, resizing or adjusting the color depth. The GIMP [4] is an open-source (free) GNU Image Manipulation Program, Adobe Photoshop [5] is a very widespread professional-grade commercial product and Corel Paint Shop Pro [6] is a less expensive commercial product. Various other bitmap-based image editors will work also.

In addition, there's a font you must have installed:

  • DejaVu Sans and DejaVu Sans Condensed are the fonts that should be used in Wikitravel maps. It can be found here.

[edit] Map types and their templates

There are two key Wikitravel map types, and it is important to be sure which category is most appropriate for your map, as the template used is different.

[edit] City or district street map

This is a detailed map of a city area most appropriate for articles created using the small city or district templates. This map type is also often appropriate for articles created with the park article template.

The map template to use can be downloaded here. Two examples follow of different types of city/district street maps, which you may find helpful as inspiration for the content and final look of your map. Both were created using the same district map template (click either to enlarge).

The Dupont Circle map is a detailed street map of a smallish city district. The London Hampstead map covers a much larger district and therefore shows less (but still considerable) detail. These are just two examples of the application of this map template.

[edit] Country or region map

This is a map of a country or a region most appropriate for articles created using the country, region or huge city templates.

Wikitravel has a special expedition for country/region map making. If you are planning to draw a map of this type, then we strongly recommend that you read that article and/or join the expedition.

The map template to use can be downloaded here. Two examples follow of different types of regional maps which you may find helpful as inspiration for the content and final look of your map. Both were created using the same region map template (click either to enlarge).

The Thailand country map shows the regions of the country, the main transport routes and major destinations. The Chicago map shows the extent of the city, major transport routes and its main district divisions.

[edit] Specialist maps

Additionally, there are some specialist map types such as dive sites and layout diagrams of monuments. If you are planning to draw a specialist map of this nature, then we suggest you download an appropriate existing SVG file and familiarise yourself with the structure and style used.

[edit] Creating your map

Now that you have your template, you are ready to address the specifics of creating your map.

Open the template in Inkscape and immediately save it as your chosen map file name.

The instructions and advice which follow apply mostly to the creation of a city or district street map. Once you have mastered this type of map though, you should have no problems with country or region maps.

For specifics on the colour palette, symbols used and what have you for a country or region map, please refer to the region maps expedition and its talk page.

[edit] Acquire a base image you can work from

In order to trace a new map, you will need either an existing SVG, or an image to trace it from (which must be compatible with our Copyleft—either in the Public Domain, or under an appropriate Creative Commons license). There are a number of possible sources:

  • OpenStreetMap.org [7] is the best place to look for maps with street level detail. It is possible to use exported SVG files from OpenStreetMap and thereby eliminate the need for any tracing. See Wikitravel:How to create a map#SVG imports from OSM for detailed instructions.
  • The Perry-Castañeda Library Map Collection [8] is the best place to look for country maps.
  • All NASA WorldWind [9] satellite images in the The Landsat Global Mosaic (except for i-3 visible layer), Blue Marble, and the USGS layers are in the public domain and are therefore fully compatible with our copyleft—they do not even require attribution. Unfortunately, however, there will usually not be high-enough resolution images in the public domain available for locations outside of the United States of America.

Your base image should be imported into a new layer which you create in your map file (layer, add layer). We recommend that you call this layer Base.

[edit] Define the background

Create a new layer called Background and using the Bezier pen (the pen symbol on the left toolbar) mark out the extent of this layer as an object to match the size of your map.

Depending on where your map is located, you will need to fill the Background layer with either grey or the Wikitravel water pattern. This is achieved by selecting the object, click object from the top menu and then fill and stroke (shortcut: shift+ctrl+f). In the menu box that appears, for a medium grey fill enter 8e908dff into the RGBA box (or use the eye dropper to select this colour from the template) and for a water pattern, select the checkboard pattern button and then pattern8479 from the drop down box. Do not use a stroke.

You should now have a filled Background layer which obscures the Base layer containing your base image. To reveal the base image again, desaturate the filled background layer using the opacity slider in the fill and stroke menu box. By taking it down to about 20% you should be able to clearly see your base image. You can also just turn off the selected layer by clicking the eye symbol in the layers box.

[edit] Define the main area

Create a layer for your main map. We suggest you call this layer Main Area. Once again using the Bezier pen, lay out the area of your map.

Once that is done, change the properties to reflect the desired pale grey area for your main map area. Use fill: d0d0d0ff, no stroke.

You should now see your desired map area completely filled. As with the background layer, you will either need to use the opacity slider to desaturate the fill or turn off the layer to see the base image below it.

[edit] Building your street grid

The pesky Bezier pen

You may find the Bezier tool a little unwieldly at first if you don't have any graphics drawing experience. But after experimenting for a while, you'll soon be able to lay out beautiful precise curves; the "Edit path nodes" tool (F2) can be used to delete or tweak points in the curve.

Create a new layer called Streets and bring that layer to the top (shift+ctrl+home).

Use the Bezier pen tool layout the road grid of your map. Roads should be white, so set the stroke colour to ffffffff, and no fill colour.

Set the unit of measurement for the stroke width to mm (far easier to visualise mm than pixels!). The stroke width should be set to an appropriate width for the road you are tracing. You will almost certainly have roads of different widths on your map and it is easier to trace each width together. A good way to keep your streets organized is to combine the paths of the same width into one path. To do so, simply select more than one path, then select "combine" from the "path" menu (ctrl+k).

If you wish to show any other transportation routes such as light railways, subway trains or rail lines etc., they should be drawn now and added to a separate layer. Use stroke colours and widths that work best on your map.

To create a black & white dotted rail line (popular among many Wikitravel mapmakers), create a solid black (or white) line, duplicate it (ctrl+d) and then set the duplicate line's fill to white and select dashes from the stroke style box (ctrl+shift+f).

Sometimes it is desirable to show footpaths, trails, pedestrian roads, etc. This should be done using a dashed line, with the stroke color eeeccbff.

[edit] Draw the geography

Pattern pathologies

Inkscape doesn't handle patterns very well. You will notice that patterned objects often display transparent gridlines, and that you seemingly cannot control the scale of the pattern.

The first problem is easily solved by duplicating the patterned object (ctrl+d), moving the duplicate below the original (PgDn/END) and then using the eyedropper tool to set the fill color to the background (green for parks, blue for water) from the original.

For the second problem, there actually is a way to scale patterns in Inkscape, though it is exceptionally well hidden. Select the patterned object with the node editor (F2). Then scroll to the left (often very far to the left), where you will see a square/circle/x "box". By clicking and dragging the square handle, you can scale the pattern.

Create a new layer called Geography and bring that layer to the top (shift+ctrl+home).

Lay out any green spaces, again using the Bezier pen, this time with the Wikitravel park pattern as fill (pattern15875), stroke color 406c86ff and a stroke width of 0.05mm. If the green area fills up an entire city block between streets, you can set stroke off, draw the area so it overlaps the streets, and then just push the layer down later.

Follow the same process for any bodies of water but use fill: pattern8479, stroke colour: 406c86ff, stroke width: 0.05mm.

Rivers should ideally be drawn with a stroke colour matching the pattern color for water (9ccec9ff), but if they are not showing up clearly enough, try something like 053bd7ff. The stroke width should match the scale of the river you are tracing.

Once this layer is complete, set it to be the layer below the Streets layer and below other transportation layers. Moving layers up and down is relatively straightforward in Inkscape. You can do this either by selecting layer, then raise layer or lower layer, or by using the shortcuts of shift+ctrl+PgUp and shift+ctrl+PgDn.

[edit] Major buildings

If (only if) your map contains any major buildings or landmarks which you wish to be defined, create a layer above Main area later called Buildings and draw them there. For these the fill color is 8e908dff, the stroke color is 808080ff and the stroke width is again 0.05mm.

[edit] Labelling

Create a new layer called Street names and bring that layer to the top (shift+ctrl+home).

It's generally best to use the DejaVu Sans bold font, which displays more clearly at small resolutions, especially when printed for offline use. Label each of your streets (or as many as is practical/desirable).

At this stage you can also place any other labels required:

  • Lake or pond names: use font colour 006bffff
  • River names: use font colour 053bd7ff
  • Park names: a label over the top of the park pattern normally looks best in white.
  • Neighbourhood names, building names etc: often look best in dark grey and not black (eg: 1a1a1aff) and italicised.

[edit] Annotate the map

Your street map is now ready and it's time to turn it into a travel guide.

Before doing so though it worth recaping what your file structure should now look like. You should have the following layers present:

  • Street names
  • Roads
  • Geography
  • Buildings (perhaps)
  • Streets
  • Other transportation routes (perhaps)
  • Main area
  • Background
  • Base

Now, create two new layers called Travel icons and Key and bring them to the top.

Depending on the scale of your map, you might need to resize the travel icons provided in the template. To resize icons use menu option object, transform, scale and scale them to a size that will work on your map (ctrl+m). (select multiple objects at once by pressing F1 and drawing a selection rectangle around them). You can copy and paste the required icons from the template.

On the template, you will see a white listings box. This should be copied and pasted into the Key layer. It can be re-sized and re-shaped to best fit your map and the volume of listings it is going to contain. Edit the text in the listings box so that it contains all listings from the article (for see/do, buy, eat, drink, sleep, and contact listings) numbered and in alphabetical order.

Take all the entries of the Wikitravel article and start placing them in the map, editing them as you go to make sure the numbers to align with those in the listings box. Ideally, of course, you'll know exactly where everything goes already but an online address locator like Google Maps is very handy for refreshing your memory. You can change the icon numbers by selecting the text tool, clicking on top of the icon, and then editing the number. Make sure not to change the font of the text in travel icons—it is formatted for maximum readability (especially when printed) at minimum size.

You should now also copy from the template and paste into this layer the inset title box (scale (ctrl-m or ctrl or alt+< or >) and edit as necessary), the scale (adjust as necessary) and the north arrow (scale as necessary). Please remember to take the extra time to add an accurate scale—it's extremely important for travelers determining just how far they'll be walking. An easy way to do this is to just match your scale to the one on your base image.

Note: It is critical to follow the above instructions insofar as you maintain separate layers for any text that could conceivably need translation into other languages, as this will make the process far, far more easy.

[edit] Finishing off

You should now have all the elements of your map completed and the following steps should ensure that it is finished off nicely:

  • Change the properties of any desaturated layers back to 100% using the opacity slider.
  • Create a final layer called Frame in which you mark out the exact area of the map you wish to be exported to the PNG file (and thereby the exact area of the map to be included in the article). This layer should always be the top layer, contain no fill and no stroke width of about 1 mm. You can select it even without a fill or stroke by navigating to the Frame layer and pressing ctrl-a to select everything within that layer (do not create more than one object in the frame layer!).
  • If you have any desire to see your name in a published book, it's a good idea to size your frame so that it can be exported at the exact resolution of 3008x1709 pixels. The thin green box on the template is already set to these proportions, so you only need to resize and/or rotate it to fit your map. For really big maps that are more square than rectangular, double the width of the box to 3008x3418, and it can then be printed as two pages.

[edit] Export the finished map

Final checklist of layers that should be present:

  • Frame
  • Travel icons
  • Key
  • Street names
  • Roads
  • Geography
  • Buildings (perhaps)
  • Streets
  • Other transportation routes (perhaps)
  • Main area
  • Background
  • Base

You should export a copy of your map to PNG by selecting your blank frame and hitting ctrl-e. This allows you to easily control the size and shape of the export.

It is best to use PNG files, as opposed to raw SVGs, because SVGs do not always display well in various browsers, Wikitravel does not offer support for SVG graphics, and most importantly, this will allow you and other editors much greater flexibility in coordinating, updating, and generally getting more use out of the SVG file.

When exporting the bitmap, enter an appropriate width in pixels — 2,000-3,000 pixels is usually reasonable, as it will give a great result when printed (remember, though, that Wikitravel Press requires the exact export size of 3008x1709 pixels). A smaller thumbnail of the map will go in the article itself, preferably at a resolution that will allow users to read all text within the article. Give the map a suitable name, click export and you are done!

[edit] Uploading your map

When uploading your map, please always do so to Wikitravel Shared and remember to upload both the bitmap (.png) and the vector (.svg) versions. That way others can add to your map at a later stage.

[edit] Help

The following Wikitravel map-makers are happy to give specific help and advice to others. Please feel perfectly free to leave any questions and requests should be left on their user talk page—you are not bothering them!

[edit] Inkscape tips and tricks

Please all map-makers use this section to add useful tips and tricks for using Inkscape.

  • Use the edit path nodes tool (F2) for manipulating streets, since this keeps the stroke width constant.
  • To extend a street, select it with edit path nodes tool and then choose the Bezier tool. Any nodes you add will become a part of the same object.
  • Use ALT-cursor keys to 'nudge' objects into the right place.
  • Objects can be combined into layers, which can be made visible or invisible by clicking on the "eye" icon. The following layer stack makes it easy to 'peel part' various components of a map: background - satellite data - area highlight - street map - area annotations.
  • Locking layers that you are not actively working on can save you a lot of trouble by making it impossible to accidentally move or change objects on the locked layers.
  • Inkscape is not the most stable of programs and is prone to hanging. It has an autosave feature in the latest version, but it's not 100% reliable; remember to save your work regularly.
  • In Inkscape, be warned that grouping items together from different layers will bring them up to the layer of the highest item in the selection.
  • Combining paths (ctrl-k) or grouping (ctrl-g) paths with the exact same attributes (streets, parks, water) can save a lot of time, as it allows you to change identical paths with a single click. To automatically select paths with the same attributes, hit ctrl-x to bring up the XML editor; highlight and copy (ctrl-c) an item relevant item under style (such as fill:XXXXXXFF); then hit ctrl-f to bring up the find box; and paste (ctrl-v) the item into the it's style field. From there press enter, and you will have selected every path in your SVG with that particular attribute!
  • The union, difference, and intersection tools from the path menu are incredibly useful for precise manipulation of objects. It will take a bit of experimentation to master their use, but this is especially worthwhile for handling complex geography, or creating interlocking color fields to display neighborhoods or regions on your map.