forked from MapComplete/MapComplete
		
	Studio: further documenting the format
This commit is contained in:
		
							parent
							
								
									f18a2b9184
								
							
						
					
					
						commit
						e8c84a70b1
					
				
					 14 changed files with 314 additions and 144 deletions
				
			
		|  | @ -51,23 +51,23 @@ | |||
|           "type": "object", | ||||
|           "properties": { | ||||
|             "geoJson": { | ||||
|               "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|               "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|               "type": "string" | ||||
|             }, | ||||
|             "geoJsonZoomLevel": { | ||||
|               "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|               "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|               "type": "number" | ||||
|             }, | ||||
|             "isOsmCache": { | ||||
|               "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|               "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|               "type": "boolean" | ||||
|             }, | ||||
|             "mercatorCrs": { | ||||
|               "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|               "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|               "type": "boolean" | ||||
|             }, | ||||
|             "idKey": { | ||||
|               "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|               "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|               "type": "string" | ||||
|             } | ||||
|           }, | ||||
|  | @ -206,7 +206,7 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "title": { | ||||
|             "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|             "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|             "anyOf": [ | ||||
|               { | ||||
|                 "$ref": "#/definitions/Record<string,string>" | ||||
|  | @ -1685,11 +1685,11 @@ | |||
|       "type": "object", | ||||
|       "properties": { | ||||
|         "enableImproveAccuracy": { | ||||
|           "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|           "type": "boolean" | ||||
|         }, | ||||
|         "enableRelocation": { | ||||
|           "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|           "type": "boolean" | ||||
|         } | ||||
|       }, | ||||
|  |  | |||
|  | @ -51,23 +51,23 @@ export default { | |||
|           "type": "object", | ||||
|           "properties": { | ||||
|             "geoJson": { | ||||
|               "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|               "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|               "type": "string" | ||||
|             }, | ||||
|             "geoJsonZoomLevel": { | ||||
|               "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|               "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|               "type": "number" | ||||
|             }, | ||||
|             "isOsmCache": { | ||||
|               "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|               "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|               "type": "boolean" | ||||
|             }, | ||||
|             "mercatorCrs": { | ||||
|               "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|               "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|               "type": "boolean" | ||||
|             }, | ||||
|             "idKey": { | ||||
|               "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|               "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|               "type": "string" | ||||
|             } | ||||
|           }, | ||||
|  | @ -206,7 +206,7 @@ export default { | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "title": { | ||||
|             "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|             "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|             "anyOf": [ | ||||
|               { | ||||
|                 "$ref": "#/definitions/Record<string,string>" | ||||
|  | @ -1668,11 +1668,11 @@ export default { | |||
|       "type": "object", | ||||
|       "properties": { | ||||
|         "enableImproveAccuracy": { | ||||
|           "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|           "type": "boolean" | ||||
|         }, | ||||
|         "enableRelocation": { | ||||
|           "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|           "type": "boolean" | ||||
|         } | ||||
|       } | ||||
|  |  | |||
|  | @ -1585,11 +1585,11 @@ | |||
|       "type": "object", | ||||
|       "properties": { | ||||
|         "enableImproveAccuracy": { | ||||
|           "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|           "type": "boolean" | ||||
|         }, | ||||
|         "enableRelocation": { | ||||
|           "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|           "type": "boolean" | ||||
|         } | ||||
|       }, | ||||
|  | @ -1748,23 +1748,23 @@ | |||
|               "type": "object", | ||||
|               "properties": { | ||||
|                 "geoJson": { | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|                   "type": "string" | ||||
|                 }, | ||||
|                 "geoJsonZoomLevel": { | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|                   "type": "number" | ||||
|                 }, | ||||
|                 "isOsmCache": { | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "mercatorCrs": { | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "idKey": { | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|                   "type": "string" | ||||
|                 } | ||||
|               }, | ||||
|  | @ -1903,7 +1903,7 @@ | |||
|             "type": "object", | ||||
|             "properties": { | ||||
|               "title": { | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|                 "anyOf": [ | ||||
|                   { | ||||
|                     "$ref": "#/definitions/Record<string,string>" | ||||
|  | @ -2155,23 +2155,23 @@ | |||
|               "type": "object", | ||||
|               "properties": { | ||||
|                 "geoJson": { | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|                   "type": "string" | ||||
|                 }, | ||||
|                 "geoJsonZoomLevel": { | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|                   "type": "number" | ||||
|                 }, | ||||
|                 "isOsmCache": { | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "mercatorCrs": { | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "idKey": { | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|                   "type": "string" | ||||
|                 } | ||||
|               }, | ||||
|  | @ -2310,7 +2310,7 @@ | |||
|             "type": "object", | ||||
|             "properties": { | ||||
|               "title": { | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|                 "anyOf": [ | ||||
|                   { | ||||
|                     "$ref": "#/definitions/Record<string,string>" | ||||
|  |  | |||
|  | @ -1568,11 +1568,11 @@ export default { | |||
|       "type": "object", | ||||
|       "properties": { | ||||
|         "enableImproveAccuracy": { | ||||
|           "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|           "type": "boolean" | ||||
|         }, | ||||
|         "enableRelocation": { | ||||
|           "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|           "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|           "type": "boolean" | ||||
|         } | ||||
|       } | ||||
|  | @ -1727,23 +1727,23 @@ export default { | |||
|               "type": "object", | ||||
|               "properties": { | ||||
|                 "geoJson": { | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|                   "type": "string" | ||||
|                 }, | ||||
|                 "geoJsonZoomLevel": { | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|                   "type": "number" | ||||
|                 }, | ||||
|                 "isOsmCache": { | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "mercatorCrs": { | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "idKey": { | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|                   "type": "string" | ||||
|                 } | ||||
|               }, | ||||
|  | @ -1882,7 +1882,7 @@ export default { | |||
|             "type": "object", | ||||
|             "properties": { | ||||
|               "title": { | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|                 "anyOf": [ | ||||
|                   { | ||||
|                     "$ref": "#/definitions/Record<string,string>" | ||||
|  | @ -2133,23 +2133,23 @@ export default { | |||
|               "type": "object", | ||||
|               "properties": { | ||||
|                 "geoJson": { | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|                   "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|                   "type": "string" | ||||
|                 }, | ||||
|                 "geoJsonZoomLevel": { | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|                   "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|                   "type": "number" | ||||
|                 }, | ||||
|                 "isOsmCache": { | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|                   "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "mercatorCrs": { | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|                   "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|                   "type": "boolean" | ||||
|                 }, | ||||
|                 "idKey": { | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|                   "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|                   "type": "string" | ||||
|                 } | ||||
|               }, | ||||
|  | @ -2288,7 +2288,7 @@ export default { | |||
|             "type": "object", | ||||
|             "properties": { | ||||
|               "title": { | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|                 "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|                 "anyOf": [ | ||||
|                   { | ||||
|                     "$ref": "#/definitions/Record<string,string>" | ||||
|  |  | |||
|  | @ -2,11 +2,11 @@ | |||
|   "type": "object", | ||||
|   "properties": { | ||||
|     "enableImproveAccuracy": { | ||||
|       "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|       "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "enableRelocation": { | ||||
|       "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|       "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|       "type": "boolean" | ||||
|     } | ||||
|   }, | ||||
|  |  | |||
|  | @ -2,11 +2,11 @@ export default { | |||
|   "type": "object", | ||||
|   "properties": { | ||||
|     "enableImproveAccuracy": { | ||||
|       "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|       "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|       "type": "boolean" | ||||
|     }, | ||||
|     "enableRelocation": { | ||||
|       "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|       "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|       "type": "boolean" | ||||
|     } | ||||
|   }, | ||||
|  |  | |||
|  | @ -89,24 +89,43 @@ export interface LayerConfigJson { | |||
|                *  to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer | ||||
|                * | ||||
|                * Some API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max} | ||||
|                * | ||||
|                * question: What is the URL of the geojson? | ||||
|                * type: url | ||||
|                */ | ||||
|               geoJson: string | ||||
|               /** | ||||
|                * To load a tiled geojson layer, set the zoomlevel of the tiles | ||||
|                * | ||||
|                * question: If using a tiled geojson, what is the zoomlevel of the tiles? | ||||
|                * ifunset: This is not a tiled geojson | ||||
|                */ | ||||
|               geoJsonZoomLevel?: number | ||||
|               /** | ||||
|                * Indicates that the upstream geojson data is OSM-derived. | ||||
|                * Useful for e.g. merging or for scripts generating this cache | ||||
|                * Useful for e.g. merging or for scripts generating this cache. | ||||
|                * This also indicates that making changes on this data is possible | ||||
|                * | ||||
|                * question: Is this geojson a cache of OpenStreetMap data? | ||||
|                * ifunset: This is not an OpenStreetMap cache | ||||
|                * iftrue: this is based on OpenStreetMap and can thus be edited | ||||
|                */ | ||||
|               isOsmCache?: boolean | ||||
|               /** | ||||
|                * Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this | ||||
|                * | ||||
|                * question: Does this geojson use  EPSG:900913 instead of WGS84 as projection? | ||||
|                * iftrue: This geojson uses EPSG:900913 instead of WGS84 | ||||
|                * ifunset: This geojson uses WGS84 just like most geojson (default) | ||||
|                */ | ||||
|               mercatorCrs?: boolean | ||||
|               /** | ||||
|                * Some API's have an id-field, but give it a different name. | ||||
|                * Setting this key will rename this field into 'id' | ||||
|                * | ||||
|                * ifunset: An id with key `id` will be assigned automatically if no attribute `id` is set | ||||
|                * inline: This geojson uses <b>{value}</b> as attribute to set the id | ||||
|                * question: What is the name of the attribute containing the ID of the object? | ||||
|                */ | ||||
|               idKey?: string | ||||
|           } | ||||
|  | @ -292,7 +311,7 @@ export interface LayerConfigJson { | |||
|          * Do _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped! | ||||
|          * | ||||
|          * question: What is the word to describe this object? | ||||
|          * inline: Add {value} here | ||||
|          * inline: Add <b>{value}</b> here | ||||
|          */ | ||||
|         title: string | Record<string, string> | ||||
|         /** | ||||
|  | @ -335,7 +354,12 @@ export interface LayerConfigJson { | |||
|         snapToLayer?: string[] | ||||
| 
 | ||||
|         /** | ||||
|          * question: What is the maximum distance in the location-input that a point can be moved to be snapped to a way? | ||||
|          * | ||||
|          * inline: a point is snapped if the location input is at most <b>{value}m</b> away from an object | ||||
|          * | ||||
|          * If specified, a new point will only be snapped if it is within this range. | ||||
|          * If further away, it'll be placed in the center of the location input | ||||
|          * Distance in meter | ||||
|          * | ||||
|          * Default: 10 | ||||
|  |  | |||
|  | @ -1,12 +1,21 @@ | |||
| export default interface MoveConfigJson { | ||||
|     /** | ||||
|      * One default reason to move a point is to improve accuracy. | ||||
|      * Set to false to disable this reason | ||||
|      * | ||||
|      * question: Should moving this type of point to improve the accuracy be allowed? | ||||
|      * iftrue: This point can be moved to improve the accuracy | ||||
|      * ifunset: (default) This point can be moved to improve the accuracy | ||||
|      * iffalse: This point cannot be moved to improve the accuracy | ||||
|      */ | ||||
|     enableImproveAccuracy?: true | boolean | ||||
|     /** | ||||
|      * One default reason to move a point is because it has relocated | ||||
|      * Set to false to disable this reason | ||||
|      * | ||||
|      * question: Should moving this type of point due to a relocation be allowed? | ||||
|      * | ||||
|      * This will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode` | ||||
|      * | ||||
|      * iftrue: This type of point can be moved due to a relocation (and will remove address information when this is done) | ||||
|      * ifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done) | ||||
|      * iffalse: This type of point cannot be moved due to a relocation | ||||
|      */ | ||||
|     enableRelocation?: true | boolean | ||||
| } | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ | |||
|     /** | ||||
|      * Blacklist for the general area tab | ||||
|      */ | ||||
|     const regionBlacklist = ["hidden",undefined,"infobox", "tagrenderings","maprendering"] | ||||
|     const regionBlacklist = ["hidden",undefined,"infobox", "tagrenderings","maprendering", "editing"] | ||||
|     const allNames =  Utils.Dedup(layerSchema.map(meta => meta.hints.group)) | ||||
| 
 | ||||
|     const perRegion: Record<string, ConfigMeta[]> = {} | ||||
|  | @ -24,26 +24,27 @@ | |||
|         perRegion[region] = layerSchema.filter(meta => meta.hints.group === region) | ||||
|     } | ||||
|      | ||||
|     const baselayerRegions: string[] = ["Basic", "presets", "editing","filters","advanced","expert"] | ||||
|     const baselayerRegions: string[] = ["Basic", "presets","filters","advanced","expert"] | ||||
|     for (const baselayerRegion of baselayerRegions) { | ||||
|         if(perRegion[baselayerRegion] === undefined){ | ||||
|             console.error("BaseLayerRegions in editLayer: no items have group '"+baselayerRegion+'"') | ||||
|         } | ||||
|     } | ||||
|     const generalTabRegions : string[] = allNames.filter(r => regionBlacklist.indexOf(r) <0) | ||||
|     const leftoverRegions : string[] = allNames.filter(r => regionBlacklist.indexOf(r) <0 && baselayerRegions.indexOf(r) <0 ) | ||||
| </script> | ||||
| 
 | ||||
| <h3>Edit layer</h3> | ||||
| 
 | ||||
| <div class="m4"> | ||||
|     {allNames} | ||||
| <TabbedGroup tab={new UIEventSource(0)}> | ||||
| <TabbedGroup tab={new UIEventSource(1)}> | ||||
|     <div slot="title0">General properties</div> | ||||
|     <div class="flex flex-col" slot="content0"> | ||||
|         {#each baselayerRegions as region} | ||||
|             <Region {state} configs={perRegion[region]} title={region}/> | ||||
|         {/each} | ||||
|         {#each generalTabRegions as region} | ||||
|          | ||||
|         {#each leftoverRegions as region} | ||||
|             <Region {state} configs={perRegion[region]} title={region}/> | ||||
|         {/each} | ||||
|     </div> | ||||
|  | @ -52,6 +53,7 @@ | |||
|     <div slot="content1"> | ||||
|         <Region {state} configs={perRegion["infobox"]} title="Infobox"/> | ||||
|         <Region {state} configs={perRegion["tagrenderings"]} title="Infobox"/> | ||||
|         <Region {state} configs={perRegion["editing"]} title="Other editing elements"/> | ||||
|     </div> | ||||
| 
 | ||||
|     <div slot="title2">Rendering on the map</div> | ||||
|  |  | |||
|  | @ -51,9 +51,9 @@ export default class EditLayerState { | |||
|         value: Store<any>, | ||||
|         noInitialSync: boolean = false | ||||
|     ): () => void { | ||||
|         const unsync = value.addCallback((v) => this.update(path, v)) | ||||
|         const unsync = value.addCallback((v) => this.setValueAt(path, v)) | ||||
|         if (!noInitialSync) { | ||||
|             this.update(path, value.data) | ||||
|             this.setValueAt(path, value.data) | ||||
|         } | ||||
|         return unsync | ||||
|     } | ||||
|  | @ -73,7 +73,7 @@ export default class EditLayerState { | |||
|         ) | ||||
|     } | ||||
| 
 | ||||
|     private update(path: ReadonlyArray<string | number>, v: any) { | ||||
|     public setValueAt(path: ReadonlyArray<string | number>, v: any) { | ||||
|         { | ||||
|             let entry = this.configuration.data | ||||
|             for (let i = 0; i < path.length - 1; i++) { | ||||
|  |  | |||
|  | @ -1,17 +1,19 @@ | |||
| <script lang="ts"> | ||||
| 
 | ||||
|     import EditLayerState from "./EditLayerState"; | ||||
|     import type {ConfigMeta} from "./configMeta"; | ||||
|     import {UIEventSource} from "../../Logic/UIEventSource"; | ||||
|     import type { ConfigMeta } from "./configMeta"; | ||||
|     import { UIEventSource } from "../../Logic/UIEventSource"; | ||||
|     import type { | ||||
|         QuestionableTagRenderingConfigJson | ||||
|     } from "../../Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson"; | ||||
|     import TagRenderingEditable from "../Popup/TagRendering/TagRenderingEditable.svelte"; | ||||
|     import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig"; | ||||
|     import {onDestroy} from "svelte"; | ||||
|     import { onDestroy } from "svelte"; | ||||
|     import SchemaBasedInput from "./SchemaBasedInput.svelte"; | ||||
|     import type {JsonSchemaType} from "./jsonSchema"; | ||||
|     import nmd from "nano-markdown" | ||||
|     import type { JsonSchemaType } from "./jsonSchema"; | ||||
|     // @ts-ignore | ||||
|     import nmd from "nano-markdown"; | ||||
| 
 | ||||
|     /** | ||||
|      * If 'types' is defined: allow the user to pick one of the types to input. | ||||
|      */ | ||||
|  | @ -102,7 +104,13 @@ | |||
|     let chosenOption: number = defaultOption | ||||
|     let subSchemas: ConfigMeta[] = [] | ||||
|     onDestroy(tags.addCallbackAndRun(tags => { | ||||
|         const oldOption = chosenOption | ||||
|         chosenOption = tags["value"] ? Number(tags["value"]) : defaultOption | ||||
|         if(chosenOption !== oldOption){ | ||||
|             // Reset the values beneath | ||||
|             subSchemas = [] | ||||
|             state.setValueAt(path, undefined) | ||||
|         } | ||||
|         const type = schema.type[chosenOption] | ||||
|         if (!type) { | ||||
|             return | ||||
|  |  | |||
|  | @ -89,23 +89,23 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "geoJson": { | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|             "type": "string" | ||||
|           }, | ||||
|           "geoJsonZoomLevel": { | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|             "type": "number" | ||||
|           }, | ||||
|           "isOsmCache": { | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "mercatorCrs": { | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "idKey": { | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|  | @ -176,9 +176,12 @@ | |||
|       "geoJson" | ||||
|     ], | ||||
|     "required": true, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "typehint": "url", | ||||
|       "question": "What is the URL of the geojson?" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}" | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -186,9 +189,12 @@ | |||
|       "geoJsonZoomLevel" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "If using a tiled geojson, what is the zoomlevel of the tiles?", | ||||
|       "ifunset": "This is not a tiled geojson" | ||||
|     }, | ||||
|     "type": "number", | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles" | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -196,9 +202,13 @@ | |||
|       "isOsmCache" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Is this geojson a cache of OpenStreetMap data?", | ||||
|       "iftrue": "this is based on OpenStreetMap and can thus be edited", | ||||
|       "ifunset": "This is not an OpenStreetMap cache" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache" | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -206,9 +216,13 @@ | |||
|       "mercatorCrs" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Does this geojson use  EPSG:900913 instead of WGS84 as projection?", | ||||
|       "iftrue": "This geojson uses EPSG:900913 instead of WGS84", | ||||
|       "ifunset": "This geojson uses WGS84 just like most geojson (default)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this" | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -216,9 +230,13 @@ | |||
|       "idKey" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "What is the name of the attribute containing the ID of the object?", | ||||
|       "ifunset": "An id with key `id` will be assigned automatically if no attribute `id` is set", | ||||
|       "inline": "This geojson uses <b>{value}</b> as attribute to set the id" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'" | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -27767,7 +27785,7 @@ | |||
|     "required": true, | ||||
|     "hints": { | ||||
|       "question": "What is the word to describe this object?", | ||||
|       "inline": "Add {value} here" | ||||
|       "inline": "Add <b>{value}</b> here" | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -32540,11 +32558,11 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "enableImproveAccuracy": { | ||||
|             "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "enableRelocation": { | ||||
|             "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|             "type": "boolean" | ||||
|           } | ||||
|         }, | ||||
|  | @ -32562,9 +32580,14 @@ | |||
|       "enableImproveAccuracy" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point to improve the accuracy be allowed?", | ||||
|       "iftrue": "This point can be moved to improve the accuracy", | ||||
|       "iffalse": "This point cannot be moved to improve the accuracy", | ||||
|       "ifunset": "(default) This point can be moved to improve the accuracy" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason" | ||||
|     "description": "" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -32572,9 +32595,14 @@ | |||
|       "enableRelocation" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point due to a relocation be allowed?", | ||||
|       "iftrue": "This type of point can be moved due to a relocation (and will remove address information when this is done)", | ||||
|       "iffalse": "This type of point cannot be moved due to a relocation", | ||||
|       "ifunset": "(default) This type of point can be moved due to a relocation (and will remove address information when this is done)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason" | ||||
|     "description": "\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  |  | |||
|  | @ -252,23 +252,23 @@ | |||
|                 "type": "object", | ||||
|                 "properties": { | ||||
|                   "geoJson": { | ||||
|                     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|                     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|                     "type": "string" | ||||
|                   }, | ||||
|                   "geoJsonZoomLevel": { | ||||
|                     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|                     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|                     "type": "number" | ||||
|                   }, | ||||
|                   "isOsmCache": { | ||||
|                     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|                     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|                     "type": "boolean" | ||||
|                   }, | ||||
|                   "mercatorCrs": { | ||||
|                     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|                     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|                     "type": "boolean" | ||||
|                   }, | ||||
|                   "idKey": { | ||||
|                     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|                     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|                     "type": "string" | ||||
|                   } | ||||
|                 }, | ||||
|  | @ -407,7 +407,7 @@ | |||
|               "type": "object", | ||||
|               "properties": { | ||||
|                 "title": { | ||||
|                   "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add {value} here", | ||||
|                   "description": "The title - shown on the 'add-new'-button.\n\nThis should include the article of the noun, e.g. 'a hydrant', 'a bicycle pump'.\nThis text will be inserted into `Add {category} here`, becoming `Add a hydrant here`.\n\nDo _not_ indicate 'new': 'add a new shop here' is incorrect, as the shop might have existed forever, it could just be unmapped!\n\nquestion: What is the word to describe this object?\ninline: Add <b>{value}</b> here", | ||||
|                   "anyOf": [ | ||||
|                     { | ||||
|                       "$ref": "#/definitions/Record<string,string>" | ||||
|  | @ -809,11 +809,11 @@ | |||
|                 "type": "object", | ||||
|                 "properties": { | ||||
|                   "enableImproveAccuracy": { | ||||
|                     "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|                     "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|                     "type": "boolean" | ||||
|                   }, | ||||
|                   "enableRelocation": { | ||||
|                     "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|                     "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|                     "type": "boolean" | ||||
|                   } | ||||
|                 }, | ||||
|  | @ -994,23 +994,23 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "geoJson": { | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|             "type": "string" | ||||
|           }, | ||||
|           "geoJsonZoomLevel": { | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|             "type": "number" | ||||
|           }, | ||||
|           "isOsmCache": { | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "mercatorCrs": { | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "idKey": { | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|  | @ -1084,9 +1084,12 @@ | |||
|       "geoJson" | ||||
|     ], | ||||
|     "required": true, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "typehint": "url", | ||||
|       "question": "What is the URL of the geojson?" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}" | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -1095,9 +1098,12 @@ | |||
|       "geoJsonZoomLevel" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "If using a tiled geojson, what is the zoomlevel of the tiles?", | ||||
|       "ifunset": "This is not a tiled geojson" | ||||
|     }, | ||||
|     "type": "number", | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles" | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -1106,9 +1112,13 @@ | |||
|       "isOsmCache" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Is this geojson a cache of OpenStreetMap data?", | ||||
|       "iftrue": "this is based on OpenStreetMap and can thus be edited", | ||||
|       "ifunset": "This is not an OpenStreetMap cache" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache" | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -1117,9 +1127,13 @@ | |||
|       "mercatorCrs" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Does this geojson use  EPSG:900913 instead of WGS84 as projection?", | ||||
|       "iftrue": "This geojson uses EPSG:900913 instead of WGS84", | ||||
|       "ifunset": "This geojson uses WGS84 just like most geojson (default)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this" | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -1128,9 +1142,13 @@ | |||
|       "idKey" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "What is the name of the attribute containing the ID of the object?", | ||||
|       "ifunset": "An id with key `id` will be assigned automatically if no attribute `id` is set", | ||||
|       "inline": "This geojson uses <b>{value}</b> as attribute to set the id" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'" | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -29885,7 +29903,7 @@ | |||
|     "required": true, | ||||
|     "hints": { | ||||
|       "question": "What is the word to describe this object?", | ||||
|       "inline": "Add {value} here" | ||||
|       "inline": "Add <b>{value}</b> here" | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -34840,11 +34858,11 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "enableImproveAccuracy": { | ||||
|             "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "enableRelocation": { | ||||
|             "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|             "type": "boolean" | ||||
|           } | ||||
|         }, | ||||
|  | @ -34863,9 +34881,14 @@ | |||
|       "enableImproveAccuracy" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point to improve the accuracy be allowed?", | ||||
|       "iftrue": "This point can be moved to improve the accuracy", | ||||
|       "iffalse": "This point cannot be moved to improve the accuracy", | ||||
|       "ifunset": "(default) This point can be moved to improve the accuracy" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason" | ||||
|     "description": "" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -34874,9 +34897,14 @@ | |||
|       "enableRelocation" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point due to a relocation be allowed?", | ||||
|       "iftrue": "This type of point can be moved due to a relocation (and will remove address information when this is done)", | ||||
|       "iffalse": "This type of point cannot be moved due to a relocation", | ||||
|       "ifunset": "(default) This type of point can be moved due to a relocation (and will remove address information when this is done)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason" | ||||
|     "description": "\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -35204,23 +35232,23 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "geoJson": { | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}", | ||||
|             "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n\nquestion: What is the URL of the geojson?\ntype: url", | ||||
|             "type": "string" | ||||
|           }, | ||||
|           "geoJsonZoomLevel": { | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles", | ||||
|             "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n\nquestion: If using a tiled geojson, what is the zoomlevel of the tiles?\nifunset: This is not a tiled geojson", | ||||
|             "type": "number" | ||||
|           }, | ||||
|           "isOsmCache": { | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache", | ||||
|             "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n\nquestion: Is this geojson a cache of OpenStreetMap data?\nifunset: This is not an OpenStreetMap cache\niftrue: this is based on OpenStreetMap and can thus be edited", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "mercatorCrs": { | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this", | ||||
|             "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n\nquestion: Does this geojson use  EPSG:900913 instead of WGS84 as projection?\niftrue: This geojson uses EPSG:900913 instead of WGS84\nifunset: This geojson uses WGS84 just like most geojson (default)", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "idKey": { | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'", | ||||
|             "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n\nifunset: An id with key `id` will be assigned automatically if no attribute `id` is set\ninline: This geojson uses <b>{value}</b> as attribute to set the id\nquestion: What is the name of the attribute containing the ID of the object?", | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|  | @ -35297,9 +35325,12 @@ | |||
|       "geoJson" | ||||
|     ], | ||||
|     "required": true, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "typehint": "url", | ||||
|       "question": "What is the URL of the geojson?" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}" | ||||
|     "description": "The actual source of the data to load, if loaded via geojson.\n\n# A single geojson-file\nsource: {geoJson: \"https://my.source.net/some-geo-data.geojson\"}\n fetches a geojson from a third party source\n\n# A tiled geojson source\nsource: {geoJson: \"https://my.source.net/some-tile-geojson-{layer}-{z}-{x}-{y}.geojson\", geoJsonZoomLevel: 14}\n to use a tiled geojson source. The web server must offer multiple geojsons. {z}, {x} and {y} are substituted by the location; {layer} is substituted with the id of the loaded layer\n\nSome API's use a BBOX instead of a tile, this can be used by specifying {y_min}, {y_max}, {x_min} and {x_max}\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -35309,9 +35340,12 @@ | |||
|       "geoJsonZoomLevel" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "If using a tiled geojson, what is the zoomlevel of the tiles?", | ||||
|       "ifunset": "This is not a tiled geojson" | ||||
|     }, | ||||
|     "type": "number", | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles" | ||||
|     "description": "To load a tiled geojson layer, set the zoomlevel of the tiles\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -35321,9 +35355,13 @@ | |||
|       "isOsmCache" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Is this geojson a cache of OpenStreetMap data?", | ||||
|       "iftrue": "this is based on OpenStreetMap and can thus be edited", | ||||
|       "ifunset": "This is not an OpenStreetMap cache" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache" | ||||
|     "description": "Indicates that the upstream geojson data is OSM-derived.\nUseful for e.g. merging or for scripts generating this cache.\nThis also indicates that making changes on this data is possible\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -35333,9 +35371,13 @@ | |||
|       "mercatorCrs" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Does this geojson use  EPSG:900913 instead of WGS84 as projection?", | ||||
|       "iftrue": "This geojson uses EPSG:900913 instead of WGS84", | ||||
|       "ifunset": "This geojson uses WGS84 just like most geojson (default)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this" | ||||
|     "description": "Some API's use a mercator-projection (EPSG:900913) instead of WGS84. Set the flag `mercatorCrs: true`  in the source for this\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -35345,9 +35387,13 @@ | |||
|       "idKey" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "What is the name of the attribute containing the ID of the object?", | ||||
|       "ifunset": "An id with key `id` will be assigned automatically if no attribute `id` is set", | ||||
|       "inline": "This geojson uses <b>{value}</b> as attribute to set the id" | ||||
|     }, | ||||
|     "type": "string", | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'" | ||||
|     "description": "Some API's have an id-field, but give it a different name.\nSetting this key will rename this field into 'id'\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -65308,7 +65354,7 @@ | |||
|     "required": true, | ||||
|     "hints": { | ||||
|       "question": "What is the word to describe this object?", | ||||
|       "inline": "Add {value} here" | ||||
|       "inline": "Add <b>{value}</b> here" | ||||
|     }, | ||||
|     "type": [ | ||||
|       { | ||||
|  | @ -70445,11 +70491,11 @@ | |||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "enableImproveAccuracy": { | ||||
|             "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point to improve the accuracy be allowed?\niftrue: This point can be moved to improve the accuracy\nifunset: (default) This point can be moved to improve the accuracy\niffalse: This point cannot be moved to improve the accuracy", | ||||
|             "type": "boolean" | ||||
|           }, | ||||
|           "enableRelocation": { | ||||
|             "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason", | ||||
|             "description": "question: Should moving this type of point due to a relocation be allowed?\n\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n\niftrue: This type of point can be moved due to a relocation (and will remove address information when this is done)\nifunset: (default) This type of point can be moved due to a relocation (and will remove address information when this is done)\niffalse: This type of point cannot be moved due to a relocation", | ||||
|             "type": "boolean" | ||||
|           } | ||||
|         }, | ||||
|  | @ -70469,9 +70515,14 @@ | |||
|       "enableImproveAccuracy" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point to improve the accuracy be allowed?", | ||||
|       "iftrue": "This point can be moved to improve the accuracy", | ||||
|       "iffalse": "This point cannot be moved to improve the accuracy", | ||||
|       "ifunset": "(default) This point can be moved to improve the accuracy" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is to improve accuracy.\nSet to false to disable this reason" | ||||
|     "description": "" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  | @ -70481,9 +70532,14 @@ | |||
|       "enableRelocation" | ||||
|     ], | ||||
|     "required": false, | ||||
|     "hints": {}, | ||||
|     "hints": { | ||||
|       "question": "Should moving this type of point due to a relocation be allowed?", | ||||
|       "iftrue": "This type of point can be moved due to a relocation (and will remove address information when this is done)", | ||||
|       "iffalse": "This type of point cannot be moved due to a relocation", | ||||
|       "ifunset": "(default) This type of point can be moved due to a relocation (and will remove address information when this is done)" | ||||
|     }, | ||||
|     "type": "boolean", | ||||
|     "description": "One default reason to move a point is because it has relocated\nSet to false to disable this reason" | ||||
|     "description": "\nThis will erase the attributes `addr:street`, `addr:housenumber`, `addr:city` and `addr:postcode`\n" | ||||
|   }, | ||||
|   { | ||||
|     "path": [ | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ import { JsonSchema } from "../UI/Studio/jsonSchema" | |||
| import { AllSharedLayers } from "../Customizations/AllSharedLayers" | ||||
| import { AllKnownLayouts } from "../Customizations/AllKnownLayouts" | ||||
| import { ConfigMeta } from "../UI/Studio/configMeta" | ||||
| import { Or } from "../Logic/Tags/Or" | ||||
| import { Utils } from "../Utils" | ||||
| 
 | ||||
| const metainfo = { | ||||
|     type: "One of the inputValidator types", | ||||
|  | @ -20,6 +20,7 @@ const metainfo = { | |||
|     inline: "A text, containing `{value}`. This will be used as freeform rendering and will be included into the rendering", | ||||
|     suggestions: "a javascript expression generating mappings", | ||||
| } | ||||
| 
 | ||||
| function WalkScheme<T>( | ||||
|     onEach: (schemePart: JsonSchema, path: string[]) => T, | ||||
|     scheme: JsonSchema, | ||||
|  | @ -217,7 +218,41 @@ function substituteReferences( | |||
|     } | ||||
| } | ||||
| 
 | ||||
| function extractMeta(typename: string, path: string, allDefinitions: Record<string, JsonSchema>) { | ||||
| function validateMeta(path: ConfigMeta): string | undefined { | ||||
|     if (path.path.length == 0) { | ||||
|         return | ||||
|     } | ||||
|     const ctx = "Definition for field in " + path.path.join(".") | ||||
|     if (path.hints.group === undefined && path.path.length == 1) { | ||||
|         return ( | ||||
|             ctx + | ||||
|             " does not have a group set (but it is a top-level element which should have a group) " | ||||
|         ) | ||||
|     } | ||||
|     if (path.hints.group === "hidden") { | ||||
|         return undefined | ||||
|     } | ||||
|     if (path.hints.typehint === "tag") { | ||||
|         return undefined | ||||
|     } | ||||
|     if (path.path[0] == "mapRendering" || path.path[0] == "tagRenderings") { | ||||
|         return undefined | ||||
|     } | ||||
|     if (path.hints.question === undefined && !Array.isArray(path.type)) { | ||||
|         return ( | ||||
|             ctx + | ||||
|             " does not have a question set. As such, MapComplete-studio users will not be able to set this property" | ||||
|         ) | ||||
|     } | ||||
| 
 | ||||
|     return undefined | ||||
| } | ||||
| 
 | ||||
| function extractMeta( | ||||
|     typename: string, | ||||
|     path: string, | ||||
|     allDefinitions: Record<string, JsonSchema> | ||||
| ): string[] { | ||||
|     let themeSchema: JsonSchema = JSON.parse( | ||||
|         readFileSync("./Docs/Schemas/" + typename + ".schema.json", { encoding: "utf8" }) | ||||
|     ) | ||||
|  | @ -230,6 +265,7 @@ function extractMeta(typename: string, path: string, allDefinitions: Record<stri | |||
| 
 | ||||
|     writeFileSync("./assets/" + path + ".json", JSON.stringify(paths, null, "  ")) | ||||
|     console.log("Written meta to ./assets/" + path) | ||||
|     return Utils.NoNull(paths.map((p) => validateMeta(p))) | ||||
| } | ||||
| 
 | ||||
| function main() { | ||||
|  | @ -257,7 +293,7 @@ function main() { | |||
|             encoding: "utf8", | ||||
|         }) | ||||
|     } | ||||
|     extractMeta("LayerConfigJson", "layerconfigmeta", allDefinitions) | ||||
|     const errs = extractMeta("LayerConfigJson", "layerconfigmeta", allDefinitions) | ||||
|     extractMeta("LayoutConfigJson", "layoutconfigmeta", allDefinitions) | ||||
|     extractMeta("TagRenderingConfigJson", "tagrenderingconfigmeta", allDefinitions) | ||||
|     extractMeta( | ||||
|  | @ -265,6 +301,13 @@ function main() { | |||
|         "questionabletagrenderingconfigmeta", | ||||
|         allDefinitions | ||||
|     ) | ||||
| 
 | ||||
|     if (errs.length > 0) { | ||||
|         for (const err of errs) { | ||||
|             console.error(err) | ||||
|         } | ||||
|         console.log((errs.length < 25 ? "Only " : "") + errs.length + " errors to solve") | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| main() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue