Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I can't figure out how can I center the map in Print Composer to layer/object/map center in the same way as in map window in QGIS 1.8. Let's say I have layer which I want have in the center of the map. In map window it is pretty easy - I just click on "Zoom to layer extent".

Unfortunately when I create map frame in Map composer, the layer is centered on width (good) but not centered on height (I guess it is aligned to bottom).

If I use button Set to map canvas extent in Print Composer / Item Properties / Extents it is again centered on width but this time aligned to top.

I think in both cases it would be much better to have it centered. Is there any way to have map centered in Print Composer to the same center as map in map window?

share|improve this question
    
Good call! This would be a nice feature. You could calculate the desired extent (though fiddling with the extent tends to change the map size in composer). I find that the 'set to map canvas extent' tends to result in a rather more zoomed out view than I actually see in my map canvas, so I just use it to get close and then manually adjust as per Willy's answer. Once I have it centered, I'll then adjust the scale to make it look like what I see on the map canvas. –  MappaGnosis Jan 11 '13 at 13:41

3 Answers 3

Well, With Qgis 2.0, you can click the "Layout" menu, then "Move Content", and adjust the layers to your liking

share|improve this answer
    
As with first answer, fiddling manually is not the way to properly center the map to object (polygon/layer) of interest. –  Miro Oct 28 '13 at 3:58

To do that I adjust the window of the map canvas. There is a control on the divider between the layer window to allow you to adjust width. By hand I guess the ratio to make it the same as the Print Composer.

share|improve this answer
    
Thank you. Unfortunately that is not the way which works for me. I mean approximately manually set the ratio of map window is kind of very unsystematic and not precise. I guess in this case it is better to set zoom and pan (move item content) to desired extent directly in print composer. Anyway thanks again for giving it try :-) –  Miro Jan 14 '13 at 0:17
    
Well if you are doing it more than once, you might be interested in using the Atlas tool and having a coverage layer to guide the extent. In that case I would refer you to other users as I am not familiar with the latest on Atlas which is in the trunk build. –  Willy Jan 14 '13 at 0:37
    
Going to research Atlas tool, thank you. I have also added this as issue to hub.qgis.org to get map centered on height when adding map frame and using button Set to map canvas extent. –  Miro Jan 14 '13 at 0:47
up vote 1 down vote accepted

On my suggestion (Feature #6988) it was Fixed in changeset 5aac8bbfe060502944b4b4cc3bfb00860b583e98. So now after hitting Set to map canvas extent in Print Composer / Item Properties / Extents the map in map frame is centered both horizontally and vertically (at this moment only in weekly builds of QGIS 2.1 - I have tested it and it works)

share|improve this answer
    
Thank you for following up with this. I'm at a loss as to why this is not the default. –  mikeLdub Apr 21 at 19:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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