I would like to add graticules to a map, once it is in the 'print composer', on the border of the map, and not on the frame (my map insists on being smaller than the frame). I have managed to add a lat/long grid over my map, and the grid lines are transparent. I do not want crosses or grid lines, just tick marks on border.

I am using QGIS Dufour (2.0) or Valmiera (2.2).

Can any one help?

  • Can you provide a picture showing how your map is smaller than the frame? That sounds odd (unless your data coverage is less than the area displayed in your map. In which case, why don't you just change the size of the map or its scale so that your view fits comfortably within the map object frame? It is not entirely clear why you are having a problem, so please edit your question to add more detail (and pictures). – MappaGnosis Apr 1 '14 at 13:45
  • Thanks for your prompt reply. Your advice did help. I am used to drawing programmes, such as CorelDRAW, and a complete newbie to GIS and QGIS. I had clipped the map extent to just the portion I wanted to show, instead of just the general vicinity. That said, I do not want lines of lat-long criss-crossing my maps, but do not know how to just make "tick marks" along my map frame (I have the co-ordinates). Any advice? – Nicky Apr 3 '14 at 6:30
  • As you've discovered, there is no need to clip your data as the map object does this for you. You CAN have tick marks on the outside only and I've set out a recipe in an answer below. – MappaGnosis Apr 3 '14 at 7:54

It is possible to get tick marks just along the edge of the map object's frame, just a little fiddly:

  1. Check 'Show Grid' in the map's Item Properties.
  2. Set the grid interval to whatever you want (some multiple of your real world units e.g. 1,000m or whatever). This will give you a complete grid, but don't worry - we'll fix that...
  3. Set 'Frame Style' to 'No Frame' (default).
  4. Click on 'Line Style' to get the Symbol Selector dialog. On the left-hand side of the dialog note the 'Symbol layers' pane.
  5. Select the item labelled 'Simple Line' and click the 'Symbol layer type' drop-down list on the top right (currently also set to 'Simple Line') and change it to 'Marker Line'. You will get a load of red dots.
  6. In 'Marker Placement' select 'on last vertex only'.
  7. Back in the Symbol layers pane, select the item marked 'Simple marker' (expand the 'Marker Line' item if necessary using the little + next to it). Change the marker to a vertical line and set its angle to 90 degrees (this is important).
  8. You are now halfway there (trust me!). Go back to the 'Symbol layers' pane and click on the very first item 'Line' (the parent in the symbol hierarchy). This enables the grey-out plus button at the bottom of the dialog box, turning it green. Press the green + button.
  9. Now repeat the steps above except this time choose 'on first vertex only' in step 6. When you are done click OK at the bottom right.

You should now have tick marks on just the edge of the map object's frame. You can change the size and thickness of the by going to Simple Marker item (last item at the bottom of each of the 'Marker line' hierarchies) and playing with 'Size', 'Colors' and ;Outline width' etc to make it look how you want.

As you have discovered, the map frame works by automatically clipping everything to its limits, this means that you can only have the tick marks pointing inwards, unless you get even more devious! To get them pointing out do this:

  1. Create a second map object and using the position and size controls, set it to exactly the same size and position as the map object with the tick marks. (it will temporarily cover it).
  2. You now need to align the data. Set the extents of the new map to match your original one. Make a note of the scale.
  3. Go to 'Position and size' and set the reference point to be the middle of the new map. adjust the Width and height so that the new map fits neatly within the tick marks of the first one. Do NOT pull the map manually with the handles.
  4. Your extent and scale will now have changed on the new map. Set ONLY the scale to the value you noted in step 2.
  5. Check 'Lock layers for map item' on the new map object.
  6. Switch back to main QGIS window and turn off all your layers until the canvas is blank.
  7. Switch back to the Map Composer and check 'Lock layers for map item' on the original map object (the one with the tick marks.

You now should have a map window showing your data and tick marks on the outside. You can go ahead and turn your layers back on now without upsetting your arrangement because you locked the layers of the tick-map item. I think it looks goof to add a frame to the inner map object (not with map's 'Show grid' but with the standard 'Frame' option towards the bottom of the Item properties controls.

|improve this answer|||||

This fix will cause QGIS v2.18.13 to crash once you close and reopen the file. However, you can now so this within the program. "Grid frame", "Frame style", choose "Interior ticks"

|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.