Refactoring: split icons into proper layered icons, fix and rerun shops-thief
This commit is contained in:
parent
d6cd0516bb
commit
19a760178b
307 changed files with 26845 additions and 116541 deletions
|
@ -3,22 +3,43 @@ export default {
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"location": {
|
||||
"description": "All the locations that this point should be rendered at.\nPossible values are:\n- `point`: only renders points at their location\n- `centroid`: show a symbol at the centerpoint of a (multi)Linestring and (multi)polygon. Points will _not_ be rendered with this\n- `projected_centerpoint`: Only on (multi)linestrings: calculate the centerpoint and snap it to the way\n- `start` and `end`: only on linestrings: add a point to the first/last coordinate of the LineString",
|
||||
"description": "question: At what location should this icon be shown?\nmultianswer: true\nsuggestions: return [{if: \"value=point\",then: \"Show an icon for point (node) objects\"},{if: \"value=centroid\",then: \"Show an icon for line or polygon (way) objects at their centroid location\"}, {if: \"value=start\",then: \"Show an icon for line (way) objects at the start\"},{if: \"value=end\",then: \"Show an icon for line (way) object at the end\"},{if: \"value=projected_centerpoint\",then: \"Show an icon for line (way) object near the centroid location, but moved onto the line\"}]",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"icon": {
|
||||
"description": "The icon for an element.\nNote that this also doubles as the icon for this layer (rendered with the overpass-tags) ánd the icon in the presets.\n\nThe result of the icon is rendered as follows:\nthe resulting string is interpreted as a _list_ of items, separated by \";\". The bottommost layer is the first layer.\nAs a result, on could use a generic pin, then overlay it with a specific icon.\nTo make things even more practical, one can use all SVG's from the folder \"assets/svg\" and _substitute the color_ in it.\nE.g. to draw a red pin, use \"pin:#f00\", to have a green circle with your icon on top, use `circle:#0f0;<path to my icon.svg>`\n\nType: icon",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
"marker": {
|
||||
"description": "question: What marker should be used to\nThe icon for an element.\nNote that this also doubles as the icon for this layer (rendered with the overpass-tags) ánd the icon in the presets.\n\nThe result of the icon is rendered as follows:\nthe resulting string is interpreted as a _list_ of items, separated by \";\". The bottommost layer is the first layer.\nAs a result, on could use a generic pin, then overlay it with a specific icon.\nTo make things even more practical, one c an use all SVG's from the folder \"assets/svg\" and _substitute the color_ in it.\nE.g. to draw a red pin, use \"pin:#f00\", to have a green circle with your icon on top, use `circle:#0f0;<path to my icon.svg>`\n\nType: icon",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"icon": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
"required": [
|
||||
"icon"
|
||||
]
|
||||
}
|
||||
},
|
||||
"iconBadges": {
|
||||
"description": "A list of extra badges to show next to the icon as small badge\nThey will be added as a 25% height icon at the bottom right of the icon, with all the badges in a flex layout.\n\nNote: strings are interpreted as icons, so layering and substituting is supported. You can use `circle:white;./my_icon.svg` to add a background circle",
|
||||
|
@ -60,7 +81,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"anchor": {
|
||||
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\nFor example, a feature attached to the ground can use 'bottom' as zooming in will give the appearance of being anchored to a fixed location.",
|
||||
"description": "question: What is the anchorpoint of the icon?\n\nThis matches the geographical point with a location on the icon.\n\nifunset: Use MapComplete-default (<b>center</b>)\nsuggestions: return [{if: \"value=center\", then: \"Place the <b>center</b> of the icon on the geographical location\"},{if: \"value=top\", then: \"Place the <b>top</b> of the icon on the geographical location\"},{if: \"value=bottom\", then: \"Place the <b>bottom</b> of the icon on the geographical location\"},{if: \"value=left\", then: \"Place the <b>left</b> of the icon on the geographical location\"},{if: \"value=right\", then: \"Place the <b>right</b> of the icon on the geographical location\"}]",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -82,7 +103,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"label": {
|
||||
"description": "A HTML-fragment that is shown below the icon, for example:\n<div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\nNote that, if the wayhandling hides the icon then no label is shown as well.",
|
||||
"description": "question: What label should be shown beneath the marker?\nFor example: <div style=\"background: white\">{name}</div>\n\nIf the icon is undefined, then the label is shown in the center of the feature.\ntypes: Dynamic value | string\ninline: Always show label <b>{value}</b> beneath the marker",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -93,7 +114,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"css": {
|
||||
"description": "A snippet of css code which is applied onto the container of the entire marker",
|
||||
"description": "question: What CSS should be applied to the entire marker?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\nThis will be applied to the _container_ containing both the marker and the label\ninline: Apply CSS-style <b>{value}</b> to the _entire marker_\ntypes: Dynamic value ; string",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -104,7 +125,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"cssClasses": {
|
||||
"description": "A snippet of css-classes which are applied onto the container of the entire marker. They can be space-separated",
|
||||
"description": "question: Which CSS-classes should be applied to the entire marker?\nThis will be applied to the _container_ containing both the marker and the label\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the entire container\ntypes: Dynamic value ; string",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -115,7 +136,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCss": {
|
||||
"description": "Css that is applied onto the label",
|
||||
"description": "question: What CSS should be applied to the label?\nYou can set the css-properties here, e.g. `background: red; font-size: 12px; `\ninline: Apply CSS-style <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -126,7 +147,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"labelCssClasses": {
|
||||
"description": "Css classes that are applied onto the label; can be space-separated",
|
||||
"description": "question: Which CSS-classes should be applied to the label?\n\nThe classes should be separated by a space (` `)\nYou can use most Tailwind-css classes, see https://tailwindcss.com/ for more information\nFor example: `center bg-gray-500 mx-2 my-1 rounded-full`\ninline: Apply CSS-classes <b>{value}</b> to the label\ntypes: Dynamic value ; string",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
@ -152,7 +173,7 @@ export default {
|
|||
]
|
||||
},
|
||||
"rotationAlignment": {
|
||||
"description": "If the map is rotated, the icon will still point to the north if no rotation was applied",
|
||||
"description": "question: Should the icon be rotated or tilted if the map is rotated or tilted?\nifunset: Do not rotate or tilt icons. Always keep the icons straight\nsuggestions: return [{if: \"value=canvas\", then: \"If the map is tilted, tilt the icon as well. This gives the impression of an icon that is glued to the ground.\"}, {if: \"value=map\", then: \"If the map is rotated, rotate the icon as well. This gives the impression of an icon that floats perpendicular above the ground.\"}]",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/TagRenderingConfigJson"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue