Jump to content

Template:OSM Location map/cssline: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
115,65
-120 -65
Line 12: Line 12:
height: {{#expr:{{{w|60}}}+{{{outline-width|5}}}*3+16 }}px;
height: {{#expr:{{{w|60}}}+{{{outline-width|5}}}*3+16 }}px;
{{#ifexpr:{{{cw|0}}}=0
{{#ifexpr:{{{cw|0}}}=0
|transform: rotate( {{#expr:{{{angle|0}}}-115 }}deg);
|transform: rotate( {{#expr:{{{angle|0}}}- }}deg);
|transform: rotate( {{#expr:{{{angle|0}}}-65 }}deg); }}">
|transform: rotate( {{#expr:{{{angle|0}}}-65 }}deg); }}">
<div style="display:inline-block; position: absolute;
<div style="display:inline-block; position: absolute;

Revision as of 23:20, 10 June 2024

Uses a CSS divs for option=

  • curveA: (x1,y1,w,cw, angle). curve line 'swoops' around 90deg, sort-of centered at x,y. sort-of length w, rotation of angle=. cw=1 for clockwise, otherwise anti-.
  • line: between two points (x1,y1) and (x2,y2).

Parameters also used are outline-width, outline-style and shape-outline which provide the line-width, css line-style and line-color for all options.

(Line works by calculating the centre-point, transform-angle and line-length needed and applies them to border-bottom. Maths comes with thanks to ES.)