8

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
7

I have solved the problem!

When you go to your print composer, you add a new map as you normally would. 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. Within this window, zoom to whatever area you want.

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

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

Go back to your full extent base map (Map 0) and go to the "Item Properties" tab and go to "Overview." Hit the green + arrow.

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

Set the symbology for your new overview! (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!)

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!

1

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?

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.