9

I posted a question yesterday about troubles I was having with labeling (which are still plaguing me), but it hit me today that it would probably be easier for me to just create zoomed in sections of my map to be able to show all of the labels properly (they are very close point locations). The problem is that I have no idea how to do this! I know that I can add another map in a smaller window and zoom from there, but I'm not sure how to get the boxed area perfectly matched up (if that makes sense). Can anyone help?

I have included an image of what I'm talking about here.

  • 1
    You should post your solution as an answer rather than an edit to the question. It's perfectly ok to answer your own question, and others can always add additional answers with different/better methods if such exist. BTW, the map feature you are referring to is called an extent indicator. There's some discussion of it around here, some specific to QGIS. I think there it's called Overview as you have used in your solution. – Chris W Jul 10 '15 at 20:31
  • OH I see that now, thank you! I will add an answer. New to the forum, still learning how it works. :) – Lauren Jul 11 '15 at 1:10
9

I have solved the problem!

When you go to your print composer, you add a new map as you normally would (let´s say it is Map 1). Leave enough space for your zoomed in portion to be displayed.

Add a new smaller, map in the area where you want your zoomed in portion to be displayed (let´s say it is Map 2). Within this window, zoom to whatever area you want.

In the "Item Properties" tab of Map 1, scroll down to "Overview" and hit the green + symbol.

enter image description here enter image description here

Set the map frame to Map 1 (this should be the full extent base map you're working with).

Set the map frame to Map 2 (this should be the zoomed in portion).

Set the symbology for your new overview in Map 1.

enter image description here

(Note: I was fiddling with it for a bit before I realized that the border style was set to "no pen" instead of solid line, which is what I wanted. Just pay attention to the details and you should be fine!)

Finnaly, I have added some lines manually and this is the results:

enter image description here

This is how I've done it, but there may be an easier/better way. Don't hesitate to comment if you know a better way!

| improve this answer | |
  • Thanks for your answer, I solved too with your hints, but it was not a straight shot, so I decided to improve your answer instead of writing a new one – Marco May 18 at 8:55
  • BTW, I think you should mark it as solved – Marco May 18 at 9:21
2

Just create a polygon feature that represents the frame of your zoomed in section and use data defined override for the extents in the print composer.

xmin(geometry(getFeature('frame', 'gid', 1)))
ymin(geometry(getFeature('frame', 'gid', 1)))
xmax(geometry(getFeature('frame', 'gid', 1)))
ymax(geometry(getFeature('frame', 'gid', 1)))

How to define map extents based on a feature's geometry?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.