../../../../_images/image710.png

Module 11: Using Map Composer

Learning Objectives

  • Arrange map layout
  • Add a new map
  • Add title to a map
  • Add graphic and numeric scales
  • Add grid to a map
  • Add an inset
  • Customise the content of the legend
  • Export a map to different formats (pdf, jpeg, svg)

A map is a means to communicate information (as well as new ideas) to the audience. We use symbology to convey the contents of our data so it can be easily understood. When we create a map layout, we go one step further - we present our map so that it becomes a means of information.

No matter what media we plan to distribute our map by (whether it’s printed or sent over the internet), we must pay attention to how the map elements are composed in the layout. In this module we will discuss the presentation of printed maps, and create our very own.

1. The Map Composer

The QGIS Map Composer allows you to prepare your map for printing. Apart from the map, you are able to add additional information such as images, labels, legends and scalebars.

  1. Let’s start with some data in the Sleman regency that has already been symbolised. Open the project named print_2_11.qgs in the qgis/ directory.
../../../../_images/image246.png

This map shows some familiar layers from the previous module. We have the roads and vegetation of Sleman, along with the three impact zones from a Merapi eruption model.

Let’s see how we can use Map Composer to adjust the layout and prepare this map for printing.

  1. Go to Project ‣ New Print Composer. Then, give a unique title name for your layout, such as My Layout 1. Click OK. A new window will load that looks like this:
../../../../_images/image247.png

This is the window where you can compose the layout of a map that you want to print. The blank white area is your “canvas.” It is a model of the paper you are going to print out. You can put various elements onto this canvas, such as your map (obviously), a title, scalebar and legend. These are elements commonly used on printed maps.

Take a look at the right panel. In the Composition tab, you can change paper size, number of pages and quality of output.

../../../../_images/image248.png

Take a look at the icons across the top of the window. We will use some of these as we lay our map out, so here’s an overview of what they do:

Display Icon Function
../../../../_images/image249.png Add New Map will add a map element. This is what we will use to add the map from our project into our print layout. It should be noted, however, that if we change the map in our QGIS project, it will not update the same map that we have added to our print composer, as we shall see later.
../../../../_images/image250.png Add Image allows us to add a picture. You can add a company or organisational logo, or simply display images from a particular location. You can also add an image of a compass (to point North).
../../../../_images/image2511.png Add New Label is used for adding text to the layout, such as titles or other information.
../../../../_images/image252.png Add New Legend is for adding a legend, which will conform to the active layer in the QGIS window.
../../../../_images/image253.png Add New Scalebar is used to add a scale to the layout.
../../../../_images/image254.png Add Ellipse/Triangle/Rectangle is used to add one of these geometric shapes. For example, this might be used to indicate special areas or highlight things on the map.
../../../../_images/image255.png Add Arrow is used to draw an arrow on the map layout.
../../../../_images/image256.png Select / Move Item allows us to choose and move the elements that are in the map layout. With this tool selected, you can right-click on an element to lock its position.

2. Adding a new map

  1. In the Print Composer window, click on the Add new map button.
../../../../_images/image249.png
  1. Next, click and drag your mouse across the canvas, creating a box. Your map layout should look similar to this when you are done:
../../../../_images/image257.png
  1. If you are not happy with the placement of your map, you can drag the corners to change the size, or drag the entire element around the canvas.
  2. Once you are happy set the scale of your map by going to the Item Properties tab in the right panel.
../../../../_images/image258.png
  1. Edit the scale and press Enter. You’ll see that the scale (zoom level) of the map element changes. A scale of about 200000 should be good for this project.
  2. Add a frame by clicking the box next to Frame. Configure the frame colour and border thickness.
../../../../_images/image259.png

Note

When you change the scale some parts of your map may become invisible. Click on the “Move item content” button and drag the map so that it is all visible.

../../../../_images/image260.png

3. Adding a title

Now we’ve got the most important thing added to our map layout - the map! But let’s add some additional elements to make it more informative.

  1. Let’s add a title to our map. Click on the Add new label button.
../../../../_images/image2511.png
  1. Adjust the size of the element. We will edit the text and the text properties in the panel on the right.
  2. Click the Font button. Change the text size to 18 and make it bold. Change the alignment to Center. Lastly, add the following text, or create your own:
../../../../_images/image2611.png ../../../../_images/image262.png

Your map layout should now look similar to this:

../../../../_images/image263.png

4. Adding a scale bar

Let’s add a scale bar, so that anyone who looks at our map will have an idea what size area this map shows.

  1. Click on the Add scale bar button.
../../../../_images/image253.png
  1. Draw the new scalebar element on your map. A good location for it is in the lower left corner of your map layout.
  2. Next we need to adjust the scalebar options. Since our project is in a PCS (Projected Coordinate System), our measurements are in metres. Enter the following values in the scalebar options:
../../../../_images/image264.png

This should result in a scalebar that looks like this:

../../../../_images/image265.png

5. Creating a grid

Now let’s create a grid for our map.

  1. Choose the Select tool and click on the map.
../../../../_images/image256.png
  1. In the panel on the right you should see the word Grid. Click on it.
  2. Check the box + and enter the following values:
../../../../_images/image266.png

Note

We used coordinate reference systems with UTM (metre) on the project QGIS and all map layers.

  1. Scroll down item properties dialog and check the box next to Draw Coordinates and enter the following values:
../../../../_images/image267.png
  1. Your map should now have a grid appear over it, which will look something like this:
../../../../_images/image268.png

Tips

Play around a little bit with the coordinate format. You can change decimal degrees as the coordinate format or change it into Degree Minute format (DD MM) or Degree Minute Second (DD MM SS).

You can also adjust the coordinate placement. You can place the text inside or outside the frame, and make the orientation either vertical or horizontal.

Change the font type and font size by clicking Font in the panel.

6. Overview inset

Next, let’s add an inset that gives viewers of our map a little more information about what they are looking at.

  1. Minimise the Print Composer and go back into QGIS.
  2. Add the layer Indonesia.shp, which is located in qgis/peta_dunia/. Click Zoom Full.
../../../../_images/image269.png

The new layer will load.

../../../../_images/image270.png
  1. Return to the Map Composer and create a new map with the Add new map button.
../../../../_images/image249.png
  1. Draw a small box on the right side of your map layout.
  2. The current view of your QGIS project will appear in the new map element (but notice that the old map element doesn’t change!). Add a frame for the inset, so that it looks like this:
../../../../_images/image2711.png

7. Adding a legend

Now let’s add a legend so that viewers of our map will know what our symbology represents.

  1. Click on the Add legend button.
../../../../_images/image252.png
  1. Draw a box in the remaining empty space on your map layout. You will see a legend with symbologies shown in a list.
  2. In the panel on the right, click on Legend items. Uncheck Auto update and use the edit button to change the names on the legend. Use the + and - buttons to add or remove items from the legend. Choose which elements are important to include.
../../../../_images/image272.png
  1. Our legend looks like this:
../../../../_images/image273.png
  1. When you are finished, your map layout should look similiar to this:
../../../../_images/image274.png

Tips

To save your map composer that you created, you can click on the Composer ‣ Save Project. So if you open the project QGIS and want to use the map composer that you saved, click on Project ‣ Print Composer ‣ My Layout 1

8. Printing the map

  1. Lastly, you can print your map. Simply click the Print button and follow the dialog.
../../../../_images/image275.png
  1. You may also save the map as PNG image.
../../../../_images/image276.png
  1. Additionally you can save the map as a PDF, which you can easily send over email or print later when you have a chance.
../../../../_images/image277.png

Go to next module –>