Template:OSM Location map/examples
Using the new dashed-line feature to mark out a distance
[edit]|mark-coord3={{coord|54.6|-4.305}} |mark-size3=350 |shape3=stroke |shape-angle3=-80.2 |label-angle3=-80.2 |label-pos3=center |ldy3=-14| ldx3=90 |label3=Direct line distance^^= 603 miles (970 km) |shape-outline3=dark grey,5,40,[8,4]
Using the new photo-panel feature to highlight a landmark
[edit]| mark-coord2 = {{coord|-35.2985|149.1417}} <!--nb panel-height is always 46 --> | label-pos2=left, photo-panel, 29, 83 <!-- pos, p-p, photo-width, panel-width--> | label-color2=hard blue <!-- in photo-panel this is also outline/line color --> | ldx2=26| ldy2=-93 <!-- sets relative position of panel to it's mark --> | label2=National ^Carillon | mark-title2=National Carillon | mark-image2=National Carillon, Canberra ACT.jpg
Using numbered dots, including the new lines features to sort out crowded dots
[edit]Austria
| label6= | label-pos6=left, n-line |ldx6=-13|ldy6=-19 | mark-coord6={{coord|48.45|10.1}} | mark-title6=[[Battle of Elchingen]] on 14 October 1805
A demonstration of some of the the various shapes and features available in the upgraded template
[edit]symbols | Full list of built in shapes (symbols): shape = circle, square, cross, diamond, triangle-up, triangle-down, triangle-right, triangle-left, stroke, arrow, wedge, triangle. |
Current list of library shapes: | |
stars | shape=star, mark=NstarD where N= number of points (5,6,7,8) and D = depth of point (1,2,3,4). This example shows '8star4'. |
rings | shape=ring, mark=circle0, circle1, circle2. Adds additional rings around an inner circle
shape=ring, mark=ring0, ring1, ring2. Similar to circle1 etc but the rings are shapes rather than just outlines. |
ellipse | shape=ellipse. Actually just another way to draw a circle, but can use mark-size=H,W to set height,width as comma-separated pixel values. |
boxes | shape=box, mark=square, square1, square2. Adds additional square outlines aound an inner box
shape=box, mark=rounded1, rounded2. These makes boxes with rounded corners. Like all library shapes they can be rotated and given height,width. |
triangles | shape=triad, mark=up, down, left, right, up1, down1, left1, right1. Triangle shapes, which are without or with an additional outline. |
lines | shape=line, mark=up, down, left, right, horizontal, vertical. Draws a line of given length (mark-size) either moving out from the start-point or centered vertically/horizontally.
shape=line, mark=up2, down2, left2, right2, horizontal2, vertical2. Two parallel lines. mark-size=H,W sets the gap as well as the length. Note that H is the gap with horizontal lines, and W the length, whereas for vertical lines it is the other way round. The lines are in effect the sides of a box drawn to size H,W |
All shapes can be assigned shape-color (with optional opacity%), shape-angle, and shape-outline. shape-color=red,1 would set the opacity to invisible. shape-color=red,100 is a solid fill. Four attributes can be set for the outline: color, width, opacity% and dash attribute. Each is comma-separated and optional but must be included in that order. The dash attribute is put in square brackets, and can assign dash-length,gap-length pairs of whatever complexity is desirable. eg: shape-outline=soft blue,1,100,[9,4] (Note - for most solid-fill shapes, the dashes will probably be an unwise choice).
Each shape can be accompanied by a label. This is text which can be assigned label-color, label-size, label-pos, label-offset-x and label-offset-y. These last 2 can be abreviated to ldx= and ldy=. They move the text the assigned distance away from the shape (minus values for left/up, plus for right/down).
label-pos can be left, right, top, bottom or center. There are optional items to draw a line from the label to the shape, or from the shape to the next shape. eg label-pos=left,with-line or label-pos=top,line-next. n-line will also add any number that would otherwise be on the shape itself via n-shape or numbered=. n-line and with-line use the ldx and ldy values to move the label away from it's shape and then draw a line to connect them. This is useful for getting the label away from a congested part of the map.
photo-panel creates a fixed-height panel (48px) to display both the label text and an optional photo, with a connecting line to its mark/shape. It requires two further comma-seperated parameters: the width of the photo and the width of the panel. eg label-pos=left,photo-panel,30,110. The position of the centre of the panel is set by ldx= and ldy= which give pixel offsets from the original mark/shape. The photo-panel connecting line uses the color assigned to the label, to create a unified look.
Using text features to differentiate and illustrate significant map features
[edit]| mark-coord12= {{coord|44.142|-77.299}} | label12=B a y o f Q u i n t e | label-angle12=-9 | label-color12=dark blue | label-size12=12 | mark-size12=0 | mark-title12=Bay of Quinte
Using new shapes and line features to add items relevant to the article
[edit]| mark-coord1 = {{coord|51.78365|-3.6553}} | shape1=box | mark1 =rounded2 | mark-size1=17 | shape-outline1=hard grey,1,70 | shape-color1=white | shape-angle1=-9 | label1 = Roman Fort | ldx1=-3 | mark-title1 = Roman Auxiliary Fort | label-pos1=left | label-angle1=0 | label-size1 = 12
- ^ Royal Commission on the Ancient and Historical Monuments of Wales (1976). Glamorgan Inventory, Vol 1, Part 2: The Iron Age and Roman Occupation. p. 100.