QGIS lesson 10 – Using print composer to export your map

hi there welcome back to lesson 10 in this lesson I'm going to be showing you how to export your map from kuja's as an SVG so you can then open it in a vector editing program like illustrator before I do that I want to add in some state labels to these four states that we added in earlier and also adding a C color which we haven't got yet so in order to do that just double click on the state polygon layer go to labels label this layer width and choose name I'm going to use Arial my font and regular 11 points and I'm just going to do it a gray instead of a blank so it doesn't clash with that other labels on our map and change it to all application let's apply that there we go now what it's done is it's placed it let's check this placement fun here offset from centroid so what that basically means is it's going to try and place it around the middle of the polygon for each state obviously we've got some town names here as well which is clashing with so in order to move that away use the horizontal and it will basically position it anywhere inside the polygon and you're trying to avoid clashing where it can obviously have a small state like Cabala it can't do that also what you should do when you're doing your label rendering is go to the windowing and always check this button here or that basically means is it will show labels even if they overlap another label otherwise sometimes you'll export your map and go and you'll see that some of the labels have disappeared it's done that because it's chooses try not to make labels clash so always check that button to make sure that all your labels that you want on there will be visible okay so I'm going to also do that with my country polygons just in case the Iraq label gets turned off because of its proximity to the other towns here so we'll okay that now I just want to ride in the sea Carl I know in order to do that just go to your project properties which is command shift P and what we're going to change is the background color which is what is essentially behind all of our polygons so click on the background color use the magnifying glass and click on your C and laser swatch ok that okay that lovely next is the exporting part they'll just do that you use what's called the print composer now to bring that up just command P and it brings up this little dialog box you don't have to type in anything here you can if you want to but it's not necessary and hit OK and that brings up this window here now click on the composition and this is the size that your map is going to export our now if you have a size it use regularly then it's a good idea to make a template of it so to do that change it to custom I'm going to do a 300 pixel template which I know the previous experience is one hundred and six millimeters unfortunately doesn't have pixels here as an option so you basically need to convert from pixels to millimeters so and I'm going to do as a web map so the exporter solution will be 72 dpi and I was going to click this one-to-one button so that's going to be the size of my Mac now in order to get your map in here you left-click this bun here add new map and then drag a rectangle over your template and that's basically what it's doing is trying to fit your window here into your window here now because this hugest window is very rectangular and they're print composer is Square is having trouble positioning the map correctly so always recommend making this window the same ratio as your print composer window so we've got a square map here so have a square map here so I'm just going to zoom in to Iraq so it's a lot tighter so that's roughly what I wanted to look like when I export it so in order to get that for you in here I suppose simple go-to item properties and then set to map canvas extent there we go so now that's basically trying to replicate your view here in your print composer now now I've created this template I'm going to save it so I can use it for future times so in order to do that very simple just click this button here and save it wherever you want to save it I'm going to call it 300 pixels and just save it so for now on you want to access it again you click this folder here and there it is available for you 300 pixel so to export the map very simply just click on this button here export as SVG and I'm going to call it C rank I've already got one here earlier so I'm just going to replace that one okay that and then switch to illustrator and then I'm just going to open it so on the desktop your back map and there it is so that's exporting your map out of cuties and into illustrator in the next lesson I'm going to show you how to fine-tune the positions of the labels and also how to add a scale onto your map you

9 thoughts on “QGIS lesson 10 – Using print composer to export your map

  1. Thank you for your tutorial. I don´t know, if it´s just a bug in my pc versus QGIS (2.8.4), but I have to always export .png image from print composer twice to get it correctly.

  2. Very cool, thank you. I'm on QGIS 2.8.2-Wien… When I go to select a background color, I don't get a magnifying glass that I can point at a swatch. Any thoughts on how to get this going? It's a nice feature to have rather than going to look up the hex/RGB values every time. Thanks in advance.

  3. Hi Steven, thanks for great tutorial! I use QGIS 2.6. When I export the qgis file to svg file, there is a warning box popping up — "The SVG export function in QGIS has several problems due to bugs and deficiencies in the Qt4 svg code. In particular, there are problems with layers not being clipped to the map bounding box.
    If you require a vector-based output file from Qgis it is suggested that you try printing to PostScript if the SVG output is not satisfactory." I'm wondering if you have run into any related problems before.

Leave a Reply

Your email address will not be published. Required fields are marked *