forked from MapComplete/MapComplete
		
	Fix studio, add options for 'rotation' (see #2072)
This commit is contained in:
		
							parent
							
								
									ba3e4b9dce
								
							
						
					
					
						commit
						081a6dbb79
					
				
					 14 changed files with 190 additions and 54 deletions
				
			
		|  | @ -178,7 +178,7 @@ | |||
|       ] | ||||
|     }, | ||||
|     "pointRendering": { | ||||
|       "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|       "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|       "type": "array", | ||||
|       "items": { | ||||
|         "$ref": "#/definitions/default_4" | ||||
|  | @ -1021,7 +1021,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "rotation": { | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -1076,7 +1076,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "cssClasses": { | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -1087,7 +1087,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "pitchAlignment": { | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  |  | |||
|  | @ -178,7 +178,7 @@ export default { | |||
|       ] | ||||
|     }, | ||||
|     "pointRendering": { | ||||
|       "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|       "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|       "type": "array", | ||||
|       "items": { | ||||
|         "$ref": "#/definitions/default_4" | ||||
|  | @ -1010,7 +1010,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "rotation": { | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -1065,7 +1065,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "cssClasses": { | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -1076,7 +1076,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "pitchAlignment": { | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  |  | |||
|  | @ -301,11 +301,21 @@ | |||
|     "enableMorePrivacy": { | ||||
|       "description": "question: Should this theme leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "enableCache": { | ||||
|       "description": "question: Should this theme have the cache enabled?\n\nShould only be dissabled in highly specific cases, such as the GRB-theme\n\nifunset: Cache is enabled\niffalse: Do not cache data\ngroup: hidden", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "_usedImages": { | ||||
|       "description": "Set by the preprocessor\ngroup: hidden", | ||||
|       "type": "array", | ||||
|       "items": { | ||||
|         "type": "string" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "required": [ | ||||
|     "description", | ||||
|     "enableMorePrivacy", | ||||
|     "icon", | ||||
|     "id", | ||||
|     "layers", | ||||
|  | @ -912,7 +922,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "rotation": { | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -967,7 +977,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "cssClasses": { | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -978,7 +988,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "pitchAlignment": { | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -2114,7 +2124,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "pointRendering": { | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|           "type": "array", | ||||
|           "items": { | ||||
|             "$ref": "#/definitions/default_4" | ||||
|  | @ -2537,7 +2547,7 @@ | |||
|           ] | ||||
|         }, | ||||
|         "pointRendering": { | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|           "type": "array", | ||||
|           "items": { | ||||
|             "$ref": "#/definitions/default_4" | ||||
|  |  | |||
|  | @ -301,11 +301,21 @@ export default { | |||
|     "enableMorePrivacy": { | ||||
|       "description": "question: Should this theme leak some location info when making changes?\n\nWhen a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this\n\nifunset: Write 'change_within_x_m' as usual and if GPS is enabled\niftrue: Do not write 'change_within_x_m' and do not indicate that this was done by survey", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "enableCache": { | ||||
|       "description": "question: Should this theme have the cache enabled?\n\nShould only be dissabled in highly specific cases, such as the GRB-theme\n\nifunset: Cache is enabled\niffalse: Do not cache data\ngroup: hidden", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "_usedImages": { | ||||
|       "description": "Set by the preprocessor\ngroup: hidden", | ||||
|       "type": "array", | ||||
|       "items": { | ||||
|         "type": "string" | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   "required": [ | ||||
|     "description", | ||||
|     "enableMorePrivacy", | ||||
|     "icon", | ||||
|     "id", | ||||
|     "layers", | ||||
|  | @ -901,7 +911,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "rotation": { | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|           "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -956,7 +966,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "cssClasses": { | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -967,7 +977,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "pitchAlignment": { | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|           "anyOf": [ | ||||
|             { | ||||
|               "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -2092,7 +2102,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "pointRendering": { | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|           "type": "array", | ||||
|           "items": { | ||||
|             "$ref": "#/definitions/default_4" | ||||
|  | @ -2514,7 +2524,7 @@ export default { | |||
|           ] | ||||
|         }, | ||||
|         "pointRendering": { | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|           "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|           "type": "array", | ||||
|           "items": { | ||||
|             "$ref": "#/definitions/default_4" | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ | |||
|       ] | ||||
|     }, | ||||
|     "rotation": { | ||||
|       "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|       "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -122,7 +122,7 @@ | |||
|       ] | ||||
|     }, | ||||
|     "cssClasses": { | ||||
|       "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|       "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -133,7 +133,7 @@ | |||
|       ] | ||||
|     }, | ||||
|     "pitchAlignment": { | ||||
|       "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|       "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ export default { | |||
|       ] | ||||
|     }, | ||||
|     "rotation": { | ||||
|       "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``\nifunset: Do not rotate", | ||||
|       "description": "question: What rotation should be applied on the icon?\nThis is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\n\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`\n\ntypes: Dynamic value ; string\nsuggestions:  return [{if: \"value={_direction:centerpoint}deg\", then: \"Point the top of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 90deg )\", then: \"Point the left of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg - 90deg )\", then: \"Point the right of the icon towards the end of the way\"}, {if: \"value=calc( {_direction:centerpoint}deg + 180deg )\", then: \"Point the bottom of the icon towards the end of the way\"}]\nifunset: Do not rotate", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -122,7 +122,7 @@ export default { | |||
|       ] | ||||
|     }, | ||||
|     "cssClasses": { | ||||
|       "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\nifunset: Do not apply extra CSS-classes to the label\ntypes: Dynamic value ; string\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|       "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\nifunset: Do not apply extra CSS-classes to the entire marker\ngroup: expert", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  | @ -133,7 +133,7 @@ export default { | |||
|       ] | ||||
|     }, | ||||
|     "pitchAlignment": { | ||||
|       "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|       "description": "question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane?\nsuggestions: return [{if: \"value=canvas\", alsoShowIf: \"value=\", then: \"The icon will stay upward and not be transformed as if it sticks to the screen\"}, {if: \"value=map\", then: \"The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)\"}]\ngroup: expert", | ||||
|       "anyOf": [ | ||||
|         { | ||||
|           "$ref": "#/definitions/TagRenderingConfigJson" | ||||
|  |  | |||
|  | @ -242,7 +242,9 @@ export interface LayerConfigJson { | |||
| 
 | ||||
|     /** | ||||
|      * Creates points to render on the map. | ||||
|      * This can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered | ||||
|      * This can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered. | ||||
|      * | ||||
|      * Note that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines
 | ||||
|      * | ||||
|      * group: pointrendering | ||||
|      */ | ||||
|  |  | |||
|  | @ -92,11 +92,12 @@ export default interface PointRenderingConfigJson { | |||
|     /** | ||||
|      * question: What rotation should be applied on the icon? | ||||
|      * This is mostly useful for items that face a specific direction, such as surveillance cameras | ||||
|      * This is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`` | ||||
|      * This is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)` | ||||
|      * | ||||
|      * If the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint` | ||||
|      * | ||||
|      * suggestions:  return [{if: "value={_direction:centerpoint}deg", then: "Point north if the icon is pointing up"}, {if: "value=calc( {_direction:centerpoint}deg + 90deg)", then: "Point east if the icon is pointing up"}, {if: "value=calc( {_direction:centerpoint}deg + 180deg)", then: "Point south if the icon is pointing up"},{if: "value=calc( {_direction:centerpoint}deg + 270deg)", then: "Point west if the icon is pointing up"}] | ||||
|      * types: Dynamic value ; string | ||||
|      * suggestions:  return [{if: "value={_direction:centerpoint}deg", then: "Point the top of the icon towards the end of the way"}, {if: "value=calc( {_direction:centerpoint}deg + 90deg )", then: "Point the left of the icon towards the end of the way"}, {if: "value=calc( {_direction:centerpoint}deg - 90deg )", then: "Point the right of the icon towards the end of the way"}, {if: "value=calc( {_direction:centerpoint}deg + 180deg )", then: "Point the bottom of the icon towards the end of the way"}] | ||||
|      * ifunset: Do not rotate | ||||
|      */ | ||||
|     rotation?: string | TagRenderingConfigJson | ||||
|  | @ -153,7 +154,6 @@ export default interface PointRenderingConfigJson { | |||
|      * You can use most Tailwind-css classes, see https://tailwindcss.com/ for more information
 | ||||
|      * For example: `center bg-gray-500 mx-2 my-1 rounded-full` | ||||
|      * inline: Apply CSS-classes <b>{value}</b> to the entire container | ||||
|      * ifunset: Do not apply extra CSS-classes to the label | ||||
|      * types: Dynamic value ; string | ||||
|      * ifunset: Do not apply extra CSS-classes to the entire marker | ||||
|      * group: expert | ||||
|  | @ -162,7 +162,7 @@ export default interface PointRenderingConfigJson { | |||
| 
 | ||||
|     /** | ||||
|      * question: If the map is pitched, should the icon stay parallel to the screen or to the groundplane? | ||||
|      * suggestions: return [{if: "value=canvas", then: "The icon will stay upward and not be transformed as if it sticks to the screen"}, {if: "value=map", then: "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)"}] | ||||
|      * suggestions: return [{if: "value=canvas", alsoShowIf: "value=", then: "The icon will stay upward and not be transformed as if it sticks to the screen"}, {if: "value=map", then: "The icon will be transformed as if it were painted onto the ground. (Automatically sets rotationAlignment)"}] | ||||
|      * group: expert | ||||
|      */ | ||||
|     pitchAlignment?: "canvas" | "map" | TagRenderingConfigJson | ||||
|  |  | |||
|  | @ -39,8 +39,8 @@ | |||
|     return sch | ||||
|   } | ||||
| 
 | ||||
|   function fusePath(i: number, subpartPath: string[]): (string | number)[] { | ||||
|     const newPath = [...path, i] | ||||
|   function fusePath(subpartPath: string[]): (string | number)[] { | ||||
|     const newPath = [...path] | ||||
|     const toAdd = [...subpartPath] | ||||
|     for (const part of path) { | ||||
|       if (toAdd[0] === part) { | ||||
|  | @ -146,7 +146,7 @@ | |||
|       <Tr cls="font-bold" t={Translations.T(value?.question ?? value?.render)} /> | ||||
|     {/if} | ||||
|   </div> | ||||
|   <div class="normal-background p-2"> | ||||
|   <div class="normal-background p-2 border border-gray-300"> | ||||
|     {#if isTagRenderingBlock} | ||||
|       <QuestionPreview {state} {path} {schema}> | ||||
|         <button | ||||
|  | @ -193,12 +193,13 @@ | |||
|         {/if} | ||||
|       </QuestionPreview> | ||||
|     {:else if schema.hints.types} | ||||
|       <SchemaBasedMultiType {state} {path} schema={schemaForMultitype()} /> | ||||
|       <SchemaBasedMultiType {state} path={[...path,i]} schema={schemaForMultitype()} /> | ||||
|     {:else} | ||||
|       {#each subparts as subpart} | ||||
|         <SchemaBasedInput | ||||
|           {state} | ||||
|           {path} | ||||
|           path={fusePath(subpart.path)} | ||||
|           schema={subpart} | ||||
|         /> | ||||
|       {/each} | ||||
|     {/if} | ||||
|  |  | |||
|  | @ -82,7 +82,7 @@ | |||
|   let highlightedItem: UIEventSource<HighlightedTagRendering> = state.highlightedItem | ||||
| </script> | ||||
| 
 | ||||
| <div class="flex h-screen flex-col"> | ||||
| <div class="flex h-screen flex-col link-underline"> | ||||
|   <div class="my-2 flex w-full flex-wrap justify-between"> | ||||
|     <slot /> | ||||
|     {#if $title === undefined} | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
|   import type * as Monaco from "monaco-editor/esm/vs/editor/editor.api" | ||||
|   import layerSchemaJSON from "../../../Docs/Schemas/LayerConfigJson.schema.json" | ||||
|   import layoutSchemaJSON from "../../../Docs/Schemas/LayoutConfigJson.schema.json" | ||||
|   import Loading from "../Base/Loading.svelte" | ||||
| 
 | ||||
|   export let state: EditLayerState | EditThemeState | ||||
| 
 | ||||
|  | @ -44,6 +45,7 @@ | |||
|   }) | ||||
| 
 | ||||
|   let useFallback = false | ||||
|   let isLoaded = false | ||||
|   onMount(async () => { | ||||
|     const monacoEditor = await import("monaco-editor") | ||||
|     loader.config({ | ||||
|  | @ -106,6 +108,7 @@ | |||
|         save() | ||||
|       }, 500) | ||||
|     }) | ||||
|     isLoaded = true | ||||
|   }) | ||||
| 
 | ||||
|   onDestroy(() => { | ||||
|  | @ -121,5 +124,11 @@ | |||
| {#if useFallback} | ||||
|   <textarea class="w-full" rows="25" bind:value={$rawConfig} /> | ||||
| {:else} | ||||
|   <div bind:this={container} class="h-full w-full" /> | ||||
|   <div bind:this={container} class="h-full w-full"> | ||||
|     {#if !isLoaded} | ||||
|       <div class="h-full w-full flex items-center align-center"> | ||||
|         <Loading /> | ||||
|       </div> | ||||
|     {/if} | ||||
|   </div> | ||||
| {/if} | ||||
|  |  | |||
|  | @ -8,8 +8,7 @@ | |||
| 
 | ||||
|   export let state: EditJsonState<any> | ||||
|   export let path: (string | number)[] = [] | ||||
|   console.log("Fetched schema:", path, state.getSchema(<any> path)) | ||||
|   let schema: ConfigMeta = state.getSchema(<any> path)[0] | ||||
|   export let schema: ConfigMeta = state.getSchema(<any> path)[0] | ||||
|   let expertMode = state.expertMode | ||||
| </script> | ||||
| {#if schema === undefined} | ||||
|  |  | |||
|  | @ -1618,7 +1618,7 @@ | |||
|       "group": "pointrendering" | ||||
|     }, | ||||
|     "type": "array", | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered" | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -1857,6 +1857,11 @@ | |||
|           "then": "party", | ||||
|           "icon": "party" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pencil", | ||||
|           "then": "pencil", | ||||
|           "icon": "pencil" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pin", | ||||
|           "then": "pin", | ||||
|  | @ -3778,8 +3783,27 @@ | |||
|     ], | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "types": "Dynamic value ; string", | ||||
|       "question": "What rotation should be applied on the icon?", | ||||
|       "ifunset": "Do not rotate" | ||||
|       "ifunset": "Do not rotate", | ||||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value={_direction:centerpoint}deg", | ||||
|           "then": "Point the top of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 90deg )", | ||||
|           "then": "Point the left of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg - 90deg )", | ||||
|           "then": "Point the right of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 180deg )", | ||||
|           "then": "Point the bottom of the icon towards the end of the way" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -3966,7 +3990,7 @@ | |||
|         "type": "string" | ||||
|       } | ||||
|     ], | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``" | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -7287,7 +7311,7 @@ | |||
|       "types": "Dynamic value ; string", | ||||
|       "group": "expert", | ||||
|       "question": "Which CSS-classes should be applied to the entire marker?", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the label", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the entire marker", | ||||
|       "inline": "Apply CSS-classes <b>{value}</b> to the entire container" | ||||
|     }, | ||||
|     "type": [ | ||||
|  | @ -7990,6 +8014,7 @@ | |||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value=canvas", | ||||
|           "alsoShowIf": "value=", | ||||
|           "then": "The icon will stay upward and not be transformed as if it sticks to the screen" | ||||
|         }, | ||||
|         { | ||||
|  |  | |||
|  | @ -277,6 +277,11 @@ | |||
|           "then": "party", | ||||
|           "icon": "party" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pencil", | ||||
|           "then": "pencil", | ||||
|           "icon": "pencil" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pin", | ||||
|           "then": "pin", | ||||
|  | @ -1542,7 +1547,7 @@ | |||
|             ] | ||||
|           }, | ||||
|           "pointRendering": { | ||||
|             "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered\n\ngroup: pointrendering", | ||||
|             "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\n\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines\n\ngroup: pointrendering", | ||||
|             "type": "array", | ||||
|             "items": { | ||||
|               "$ref": "#/definitions/default_4" | ||||
|  | @ -3863,7 +3868,7 @@ | |||
|       "group": "pointrendering" | ||||
|     }, | ||||
|     "type": "array", | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered" | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -4106,6 +4111,11 @@ | |||
|           "then": "party", | ||||
|           "icon": "party" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pencil", | ||||
|           "then": "pencil", | ||||
|           "icon": "pencil" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pin", | ||||
|           "then": "pin", | ||||
|  | @ -6088,8 +6098,27 @@ | |||
|     ], | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "types": "Dynamic value ; string", | ||||
|       "question": "What rotation should be applied on the icon?", | ||||
|       "ifunset": "Do not rotate" | ||||
|       "ifunset": "Do not rotate", | ||||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value={_direction:centerpoint}deg", | ||||
|           "then": "Point the top of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 90deg )", | ||||
|           "then": "Point the left of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg - 90deg )", | ||||
|           "then": "Point the right of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 180deg )", | ||||
|           "then": "Point the bottom of the icon towards the end of the way" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -6276,7 +6305,7 @@ | |||
|         "type": "string" | ||||
|       } | ||||
|     ], | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``" | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -9707,7 +9736,7 @@ | |||
|       "types": "Dynamic value ; string", | ||||
|       "group": "expert", | ||||
|       "question": "Which CSS-classes should be applied to the entire marker?", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the label", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the entire marker", | ||||
|       "inline": "Apply CSS-classes <b>{value}</b> to the entire container" | ||||
|     }, | ||||
|     "type": [ | ||||
|  | @ -10432,6 +10461,7 @@ | |||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value=canvas", | ||||
|           "alsoShowIf": "value=", | ||||
|           "then": "The icon will stay upward and not be transformed as if it sticks to the screen" | ||||
|         }, | ||||
|         { | ||||
|  | @ -24792,7 +24822,7 @@ | |||
|       "group": "pointrendering" | ||||
|     }, | ||||
|     "type": "array", | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered" | ||||
|     "description": "Creates points to render on the map.\nThis can render points for point-objects, lineobjects or areaobjects; use 'location' to indicate where it should be rendered.\nNote that all attributes - including [the calculated tags](https://github.com/pietervdvn/MapComplete/blob/develop/Docs/CalculatedTags.md) can be used to create the markers and lines" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -25039,6 +25069,11 @@ | |||
|           "then": "party", | ||||
|           "icon": "party" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pencil", | ||||
|           "then": "pencil", | ||||
|           "icon": "pencil" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=pin", | ||||
|           "then": "pin", | ||||
|  | @ -27082,8 +27117,27 @@ | |||
|     ], | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "types": "Dynamic value ; string", | ||||
|       "question": "What rotation should be applied on the icon?", | ||||
|       "ifunset": "Do not rotate" | ||||
|       "ifunset": "Do not rotate", | ||||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value={_direction:centerpoint}deg", | ||||
|           "then": "Point the top of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 90deg )", | ||||
|           "then": "Point the left of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg - 90deg )", | ||||
|           "then": "Point the right of the icon towards the end of the way" | ||||
|         }, | ||||
|         { | ||||
|           "if": "value=calc( {_direction:centerpoint}deg + 180deg )", | ||||
|           "then": "Point the bottom of the icon towards the end of the way" | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -27270,7 +27324,7 @@ | |||
|         "type": "string" | ||||
|       } | ||||
|     ], | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)``" | ||||
|     "description": "This is mostly useful for items that face a specific direction, such as surveillance cameras\nThis is interpreted as css property for 'rotate', thus has to end with 'deg', e.g. `90deg`, `{direction}deg`, `calc(90deg - {camera:direction}deg)`\nIf the icon is shown on the projected centerpoint of a way, one can also use `_direction:centerpoint`" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -30811,7 +30865,7 @@ | |||
|       "types": "Dynamic value ; string", | ||||
|       "group": "expert", | ||||
|       "question": "Which CSS-classes should be applied to the entire marker?", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the label", | ||||
|       "ifunset": "Do not apply extra CSS-classes to the entire marker", | ||||
|       "inline": "Apply CSS-classes <b>{value}</b> to the entire container" | ||||
|     }, | ||||
|     "type": [ | ||||
|  | @ -31558,6 +31612,7 @@ | |||
|       "suggestions": [ | ||||
|         { | ||||
|           "if": "value=canvas", | ||||
|           "alsoShowIf": "value=", | ||||
|           "then": "The icon will stay upward and not be transformed as if it sticks to the screen" | ||||
|         }, | ||||
|         { | ||||
|  | @ -44986,7 +45041,7 @@ | |||
|     "path": [ | ||||
|       "enableMorePrivacy" | ||||
|     ], | ||||
|     "required": true, | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "question": "Should this theme leak some location info when making changes?", | ||||
|       "iftrue": "Do not write 'change_within_x_m' and do not indicate that this was done by survey", | ||||
|  | @ -44994,5 +45049,30 @@ | |||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "When a changeset is made, a 'distance to object'-class is written to the changeset.\nFor some particular themes and layers, this might leak too much information, and we want to obfuscate this" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|       "enableCache" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "group": "hidden", | ||||
|       "question": "Should this theme have the cache enabled?", | ||||
|       "iffalse": "Do not cache data", | ||||
|       "ifunset": "Cache is enabled" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Should only be dissabled in highly specific cases, such as the GRB-theme" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|       "_usedImages" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": { | ||||
|       "group": "hidden" | ||||
|     }, | ||||
|     "type": "array", | ||||
|     "description": "Set by the preprocessor" | ||||
|   } | ||||
| ] | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue