Template:Map with marks/doc: Difference between revisions

Content deleted Content added
No edit summary
sync from mediawiki
Line 80:
}
}}
|}
 
The data template parameter must be a comma separated list of "JSON" objects. Each object starts with a "{", has a list of comma separated list of key-value pairs, and ends with a "}". The key may be one of the following values (used no more than once per each object):
 
{| class="wikitable"
! colspan="2" |Built-in marker shapes
|-
|shape
|"circle" (default), "square", "cross", "diamond", "triangle-up", "triangle-down" ([https://github.com/vega/vega/wiki/Marks#symbol docs])
|-
| color || shape fill color, e.g. "#ff0000" (red - default)
|-
| strokeColor
|shape outline color
|-
|size
|shape size (number)
|-
! colspan="2" |Text labels (see [https://github.com/vega/vega/wiki/Marks#text more info])
|-
| text
|Label text
|-
| textAlign
|Label's horizontal alignment relative to the marker - "left", "right", "center". By default, left for LTR, right for RTL languages.
|-
| textBaseline
|Vertical alignment: "middle" (default), "top", "bottom"
|-
| textColor
|Label text color, e.g. "#ff0000" (red)
|-
| textDx, textDy
|Horizontal and vertical distance from the marker
|-
|angle
|Draw text at an angle
|-
|radius/theta
|Radial positioning of the label relative to the marker
|-
|font, fontSize, fontWeight, fontStyle
|Font name, size, boldness, and style
|-
! colspan="2" |Image markers
|-
| img || URL of an image, e.g. <nowiki>wikirawupload:{{filepath:Volcano red 32x32.svg|32}}</nowiki>
|-
| height, width
|Size of the image
|-
| offsetX, offsetY
|Shift the center of the image on the map
|}