Outdated version of the documentation. Find the latest one here.

Ítem do Mapa

Clique na barra de ferramentas no botão |mActionAddMap| Adicionar novo Mapa, na barra de ferramentas do compositor de impressão para adicionar o mapa à tela do QGIS. Agora, arraste um retângulo na tela do Compositor com o botão esquerdo do mouse para adicionar uma janela de mapa. Para exibir o mapa atual, você pode escolher entre três modos diferentes na guia do mapa Propriedades do item:

  • Retângulo é a configuração padrão. Apenas exibe uma caixa vazia com a mensagem ‘O mapa será impresso aqui’.

  • Cache carrega o mapa na resolução da tela atual. Se você ampliar a janela Compositor dentro ou para fora, o mapa não é processado novamente, mas a imagem será redimensionada.

  • Edição significa que, se você aumentar o zoom da janela do Compositor para dentro ou para fora, o mapa será processado novamente, mas por razões de espaço, apenas até uma resolução máxima.

Cache é o modo de visualização padrão para mapas do compositor de impressão recém adicionados.

Para mover camadas dentro do elemento do mapa, selecione o elemento desejado, clique no ícone |mActionMoveItemContent| Mover conteúdo do item e mova as camadas dentro do quadro do item do mapa com o botão esquerdo do mouse. Depois de ter encontrado o lugar certo para o item, você pode bloquear a posição do item dentro da tela do compositor de impressão. Selecione o item do mapa e use a barra de ferramentas |bloqueado| Bloquear itens Selecionados ou a guia itens para bloquear o item. Um item bloqueado só podem ser selecionado usando a guia itens. Uma vez selecionado, você pode usar a guia itens para desbloquear itens individuais. O ícone |desbloqueado| Desbloquear todos os itens vai desbloquear todos os itens bloqueados do compositor.

To move layers within the map element, select the map element, click the moveItemContent Move item content icon and move the layers within the map item frame with the left mouse button.

Propriedades principais

The Main properties dialog of the map Item Properties tab provides the following functionalities (see figure_composer_map_1):

Figure Composer Map 1:

../../../../_images/map_mainproperties.png

Map Item properties Tab

  • The Preview area allows you to define the preview modes ‘Rectangle’, ‘Cache’ and ‘Render’, as described above. If you change the view on the QGIS map canvas by changing vector or raster properties, you can update the Print Composer view by selecting the map element in the Print Composer and clicking the [Update preview] button.

  • The field Scale selectNumber sets a manual scale.

  • The field Map rotation selectNumber allows you to rotate the map element content clockwise in degrees. The rotation of the map view can be imitated here. Note that a correct coordinate frame can only be added with the default value 0 and that once you defined a Map rotation it currently cannot be changed.

  • checkbox Draw map canvas items lets you show annotations that may be placed on the map canvas in the main QGIS window.

  • You can choose to lock the layers shown on a map item. Check checkbox Lock layers for map item. After this is checked, any layer that would be displayed or hidden in the main QGIS window will not appear or be hidden in the map item of the Composer. But style and labels of a locked layer are still refreshed according to the main QGIS interface. You can prevent this by using Lock layer styles for map item.

  • The showPresets button allows you to add quickly all the presets views you have prepared in QGIS. Clicking on the showPresets button you will see the list of all the preset views: just select the preset you want to display. The map canvas will automatically lock the preset layers by enabling the checkbox Lock layers for map item: if you want to unselect the preset, just uncheck the checkbox and press the draw button. See Layers Panel to find out how to create presets views.

    Locked layers in the map can also be data-defined, using the dataDefined icon beside the option. When used, this overrides the selection set in the drop-down list. You need to pass a list of layers separated by | character. The following example locks the map item to use only layers layer 1 and layer 2:

    concat ('layer 1', '|', 'layer 2')
    

Extents

The Extents dialog of the map item tab provides the following functionalities (see figure_composer_map_2):

Figure Composer Map 2:

../../../../_images/map_extents.png

Map Extents Dialog

  • The Map extents area allows you to specify the map extent using X and Y min/max values and by clicking the [Set to map canvas extent] button. This button sets the map extent of the composer map item to the extent of the current map view in the main QGIS application. The button [View extent in map canvas] does exactly the opposite, it updates the extent of the map view in the QGIS application to the extent of the composer map item.

If you change the view on the QGIS map canvas by changing vector or raster properties, you can update the Print Composer view by selecting the map element in the Print Composer and clicking the [Update preview] button in the map Item Properties tab (see figure_composer_map_1).

Grids

The Grids dialog of the map Item Properties tab provides the possibility to add several grids to a map item.

  • With the plus and minus button you can add or remove a selected grid.
  • With the up and down button you can move a grid in the list and set the drawing priority.

When you double click on the added grid you can give it another name.

Figure Composer Map 3:

../../../../_images/map_grids.png

Map Grids Dialog

After you have added a grid, you can activate the checkbox checkbox Draw grid to overlay a grid onto the map element. Expand this option to provide a lot of configuration options, see Figure_composer_map_4.

Figure Composer Map 4:

../../../../_images/map_draw_grid.png

Draw Grid Dialog

As grid type, you can specify to use a ‘Solid’, ‘Cross’, ‘Markers’ or ‘Frame and annotations only’. ‘Frame and annotations only’ is especially useful when working with rotated maps or reprojected grids. In the divisions section of the Grid Frame Dialog mentioned below you then have a corresponding setting. Symbology of the grid and its rendering mode can be chosen. See Modo de renderização. Furthermore, you can define an interval in the X and Y directions, an X and Y offset, and the width used for the cross or line grid type.

Figure Composer Map 5:

../../../../_images/map_grid_frame.png

Grid Frame Dialog

  • There are different options to style the frame that holds the map. Following options are available: No Frame, Zebra, Interior ticks, Exterior ticks, Interior and Exterior ticks and Lineborder.
  • With ‘Latitude/Y only’ and ‘Longitude/X only’ setting in the divisions section you have the possibility to prevent a mix of latitude/y and longitude/x coordinates showing on a side when working with rotated maps or reprojected grids.
  • Advanced rendering mode is also available for grids.
  • The checkbox Draw coordinates checkbox allows you to add coordinates to the map frame. You can choose the annotation numeric format, the options range from decimal to degrees, minute and seconds, with or without suffix, aligned or not and a custom format using the expression dialog. You can choose which annotation to show. The options are: show all, latitude only, longitude only, or disable(none). This is useful when the map is rotated. The annotation can be drawn inside or outside the map frame. The annotation direction can be defined as horizontal, vertical ascending or vertical descending. Finally, you can define the annotation font, the annotation font color, the annotation distance from the map frame and the precision of the drawn coordinates.

Figure Composer map 6:

../../../../_images/map_grid_draw_coordinates.png

Grid Draw Coordinates dialog

Overviews

The Overviews dialog of the map Item Properties tab provides the following functionalities:

Figure Composer Map 7:

../../../../_images/map_overview.png

Map Overviews Dialog

You can choose to create an overview map, which shows the extents of the other map(s) that are available in the composer. First you need to create the map(s) you want to include in the overview map and the map you want to use as the overview map, just like a normal map.

Then expand Overviews option and press the green plus icon-button to add an overview. Initially this overview is named ‘Overview 1’ (see Figure_composer_map_7). You can change the name when you double-click on the overview item in the list named ‘Overview 1’ and change it to another name.

  • With the plus and minus button you can add or remove an overview.
  • With the up and down button you can move an overview in the list and set the drawing priority.

When you select the overview item in the list you can customize it.

  • The checkbox Draw “<name_overview>” overview needs to be activated to draw the extent of selected map frame.
  • The Map frame combo list can be used to select the map item whose extents will be drawn on the present map item.
  • The Frame Style allows you to change the style of the overview frame.
  • The Blending mode allows you to set different transparency blend modes.
  • The checkbox Invert overview creates a mask around the extents when activated: the referenced map extents are shown clearly, whereas everything else is blended with the frame color.
  • The checkbox Center on overview puts the extent of the overview frame in the center of the overview map. You can only activate one overview item to center, when you have added several overviews.