{
	"title": "WebMap",
	"$ref": "#/definitions/WebMap",
	"definitions": {
		"UT": {
			"description": "没从layerV4ToV5函数中推断出类型的字段。UT即UnknownType"
		},
		"WebMap": {
			"type": "object",
			"additionalProperties": false,
			"required": [
				"version",
				"title",
				"projection",
				"baseLayer",
				"minScale",
				"maxScale"
			],
			"properties": {
				"$schema": {
					"type": "string",
					"format": "uri"
				},
				"version": {
					"oneOf": [
						{
							"const": "1.0"
						},
						{
							"const": "2.0.0"
						},
						{
							"const": "2.1.0"
						},
						{
							"const": "2.2.1"
						},
						{
							"const": "2.3.0"
						}
					]
				},
				"rootUrl": {
					"$comment": "WebMap所属iportal的访问地址，Web打印服务需要。该字段只在访问 iportal/web/maps{id}/map.json时iportal根据当前请求生成对应的值并加入到response中输出。",
					"type": "string",
					"format": "uri"
				},
				"title": {
					"type": "string"
				},
				"description": {
					"type": "string"
				},
				"projection": {
					"$ref": "#/definitions/Projection"
				},
				"center": {
					"$ref": "#/definitions/Point2D"
				},
				"extent": {
					"$ref": "#/definitions/Rectangle2D"
				},
				"visibleExtent": {
					"description": "当前显示视图范围",
					"type": "array",
					"items": {
						"type": "number"
					},
					"minItems": 4,
					"maxItems": 4,
					"additionalItems": false
				},
				"level": {
					"type": "number",
					"minimum": 0,
					"maximum": 22
				},
				"appSettings": {
					"type": "object",
					"$comment": "app专有配置，暂时还没有",
					"additionalProperties": false,
					"properties": {}
				},
				"baseLayer": {
					"oneOf": [
						{
							"$ref": "#/definitions/TileLayer"
						},
						{
							"$ref": "#/definitions/TiandituLayer"
						},
						{
							"$ref": "#/definitions/InternetMap"
						},
						{
							"$ref": "#/definitions/WMTSLayer"
						},
						{
							"$ref": "#/definitions/WMSLayer"
						},
						{
							"$ref": "#/definitions/MapStylerLayer"
						}
					]
				},
				"layers": {
					"type": "array",
					"items": {
						"type": "object",
						"required": [
							"layerType"
						],
						"properties": {
							"layerType": {
								"oneOf": [
									{
										"$ref": "#/definitions/LayerTypes/definitions/TILE"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/HOSTED_TILE"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/WMTS"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/WMS"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/MARKER"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/HEAT"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/VECTOR"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/MAPBOXSTYLE"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/UNIQUE"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/RANGE"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_POINT_TRACK"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_HEAT"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/RANK_SYMBOL"
									},
									{
										"$ref": "#/definitions/LayerTypes/definitions/MIGRATION"
									}
								]
							}
						},
						"allOf": [
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/TILE"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/TileLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/HOSTED_TILE"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/HostedTileLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/WMTS"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/WMTSLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/WMS"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/WMSLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"oneOf": [
												{
													"$ref": "#/definitions/LayerTypes/definitions/VECTOR"
												},
												{
													"$ref": "#/definitions/LayerTypes/definitions/UNIQUE"
												},
												{
													"$ref": "#/definitions/LayerTypes/definitions/RANGE"
												},
												{
													"$ref": "#/definitions/LayerTypes/definitions/RANK_SYMBOL"
												}
											]
										}
									}
								},
								"then": {
									"$ref": "#/definitions/VectorLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/HEAT"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/HeatLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/MARKER"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/MarkerLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_POINT_TRACK"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/DataflowPointTrackLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_HEAT"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/DataflowHeatLayer"
								}
							},
							{
								"if": {
									"type": "object",
									"properties": {
										"layerType": {
											"$ref": "#/definitions/LayerTypes/definitions/MIGRATION"
										}
									}
								},
								"then": {
									"$ref": "#/definitions/MigrationLayer"
								}
							}
						]
					}
				},
				"maxScale": {
					"$ref": "#/definitions/LayerCommon/properties/visibleScale/definitions/Scale"
				},
				"minScale": {
					"$ref": "#/definitions/LayerCommon/properties/visibleScale/definitions/Scale"
				},
				"grid": {
					"type": "object",
					"description": "格网",
					"properties": {
						"graticule": {
							"$ref": "#/definitions/Graticule"
						}
					}
				}
			}
		},
		"StyleTypes": {
			"definitions": {
				"BASIC_POINT": {
					"const": "BASIC_POINT"
				},
				"IMAGE_POINT": {
					"const": "IMAGE_POINT"
				},
				"SVG_POINT": {
					"const": "SVG_POINT"
				},
				"SYMBOL_POINT": {
					"const": "SYMBOL_POINT"
				},
				"LINE": {
					"const": "LINE"
				},
				"POLYGON": {
					"const": "POLYGON"
				}
			}
		},
		"Projection": {
			"$comment": "EPSG或者wkt。WKT参考：http://docs.opengeospatial.org/is/12-063r5/12-063r5.html",
			"oneOf": [
				{
					"type": "string",
					"pattern": "^EPSG\\:-?\\d+$",
					"examples": ["EPSG:4490"]
				},
				{
					"type": "string",
					"pattern": "^(BOUNDCRS)|(COMPOUNDCRS)|(ENGCRS)|(ENGINEERINGCRS)|(GEODCRS)|(GEODETICCRS)|(IMAGECRS)|(PARAMETRICCRS)|(PROJCRS)|(PROJECTEDCRS)|(TIMECRS)|(VERTCRS)|(VERTICALCRS)|(COORDINATEOPERATION)|(COMPDCS)|(FITTED_CS)|(GEOCCS)|(GEOGCS)|(LOCAL_CS)|(PROJCS)|(VERT_CS).*\\]$^((BOUNDCRS)|(COMPOUNDCRS)|(ENGCRS)|(ENGINEERINGCRS)|(GEODCRS)|(GEODETICCRS)|(IMAGECRS)|(PARAMETRICCRS)|(PROJCRS)|(PROJECTEDCRS)|(TIMECRS)|(VERTCRS)|(VERTICALCRS)|(COORDINATEOPERATION)|(COMPDCS)|(FITTED_CS)|(GEOCCS)|(GEOGCS)|(LOCAL_CS)|(PROJCS)|(VERT_CS)).+\\]$",
					"examples": ["GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]"]
				}
			]
		},
		"LayerTypes": {
			"$comment": "TODO",
			"definitions": {
				"HOSTED_TILE": {
					"const": "HOSTED_TILE"
				},
				"TILE": {
					"const": "TILE"
				},
				"WMTS": {
					"const": "WMTS"
				},
				"WMS": {
					"const": "WMS"
				},
				"MARKER": {
					"const": "MARKER"
				},
				"HEAT": {
					"const": "HEAT"
				},
				"VECTOR": {
					"const": "VECTOR"
				},
				"UNIQUE": {
					"const": "UNIQUE"
				},
				"RANGE": {
					"const": "RANGE"
				},
				"MAPBOXSTYLE": {
					"const": "MAPBOXSTYLE"
				},
				"DATAFLOW_POINT_TRACK": {
					"$comment": "dataflow数据流服务点轨迹图层",
					"const": "DATAFLOW_POINT_TRACK"
				},
				"DATAFLOW_HEAT": {
					"const": "DATAFLOW_HEAT"
				},
				"RANK_SYMBOL": {
					"const": "RANK_SYMBOL"
				},
				"MIGRATION": {
					"$comment": "迁徙图",
					"const": "MIGRATION"
				}
			}
		},
		"Color": {
			"type": "string",
			"pattern": "^#[a-fA-F0-9]{6}$|^#[a-fA-F0-9]{3}$"
		},
		"Opacity": {
			"type": "number",
			"minimum": 0,
			"maximum": 1
		},
		"LineDash": {
			"description": "线类型",
			"type": "string",
			"enum": [
				"solid",
				"dot",
				"dash",
				"dashdot",
				"longdash",
				"longdashdot"
			]
		},
		"Style": {
			"type": "object",
			"properties": {
				"lineDash": {
					"$ref": "#/definitions/LineDash"
				},
				"lineCap": {
					"description": "线端点类型",
					"type": "string",
					"enum": [
						"butt",
						"round",
						"square"
					]
				},
				"fillColor": {
					"$ref": "#/definitions/Color"
				},
				"strokeColor": {
					"$ref": "#/definitions/Color"
				},
				"fillOpacity": {
					"$ref": "#/definitions/Opacity"
				}
			},
			"additionalProperties": false
		},
		"LabelStyle": {
			"type": "object",
			"description": "所有图层（点线面）选择了标签字段后，这个属性就会存在，保存当前的标信息",
			"properties": {
				"labelField": {
					"type": "string"
				},
				"fontFamily": {
					"type": "string"
				},
				"fill": {
					"$ref": "#/definitions/Color"
				},
				"fontSize": {
					"type": "string",
					"pattern": "^\\d+px$"
				},
				"filterCondition": {
					"type": "string"
				},
				"backgroundFill": {
					"type": "array",
					"items": [
						{
							"type": "integer",
							"minimum": 0,
							"maximum": 255
						},
						{
							"type": "integer",
							"minimum": 0,
							"maximum": 255
						},
						{
							"type": "integer",
							"minimum": 0,
							"maximum": 255
						},
						{
							"$ref": "#/definitions/Opacity"
						}
					],
					"default": [
						255,
						255,
						255,
						0.7
					],
					"additionalItems": false
				},
				"offsetX": {
					"type": "number",
					"description": "标签的X方向偏移值，分数"
				},
				"offsetY": {
					"type": "number",
					"description": "标签的Y方向偏移值，分数"
				},
				"textBaseline": {
					"type": "string",
					"enum": [
						"bottom",
						"top",
						"middle"
					]
				},
				"textAlign": {
					"type": "string",
					"enum": [
						"left",
						"right",
						"center"
					]
				},
				"outlineColor": {
					"type": "string",
					"description": "文本的轮廓颜色"
				},
				"outlineWidth": {
					"type": "number",
					"description": "文本的轮廓宽度"
				}
			},
			"additionalItems": false
		},
		"PointStyle": {
			"definitions": {
				"BasicPoint": {
					"description": "普通点风格",
					"type": "object",
					"properties": {
						"type": {
							"$ref": "#/definitions/StyleTypes/definitions/BASIC_POINT"
						},
						"radius": {
							"type": "number",
							"description": "从前layerV4ToV5函数来看是共有的。其中POINT，HEAT，SYMBOL图层单独设置了该属性。"
						},
						"fillColor": {
							"$ref": "#/definitions/Color"
						},
						"fillOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"strokeColor": {
							"$ref": "#/definitions/Color"
						},
						"strokeOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"strokeWidth": {
							"type": "number",
							"description": "边线宽度"
						},
						"offsetX": {
							"type": "number",
							"description": "点符号的X方向偏移值，分数，范围-1~1"
						},
						"offsetY": {
							"type": "number",
							"description": "点符号的Y方向偏移值，分数。范围-1~1"
						}
					},
					"additionalProperties": false
				},
				"SymbolPoint": {
					"type": "object",
					"description": "使用字体符号的点图层风格设置",
					"additionalProperties": false,
					"properties": {
						"type": {
							"$ref": "#/definitions/StyleTypes/definitions/SYMBOL_POINT"
						},
						"className": {
							"type": "string"
						},
						"name": {
							"type": "string"
						},
						"unicode": {
							"$comment": "http://www.iconfont.cn/help/detail?spm=a313x.7781069.1998910419.13&helptype=about",
							"type": "string"
						},
						"fillColor": {
							"$ref": "#/definitions/Color"
						},
						"fillOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"fontSize": {
							"type": "string",
							"pattern": "\\d+px"
						},
						"strokeColor": {
							"$ref": "#/definitions/Color"
						},
						"strokeOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"strokeWidth": {
							"type": "number"
						},
						"offsetX": {
							"type": "number",
							"description": "点符号的X方向偏移值，分数，范围-1~1"
						},
						"offsetY": {
							"type": "number",
							"description": "点符号的Y方向偏移值，分数。范围-1~1"
						},
						"rotation": {
							"type": "number",
							"description": "旋转偏移值，单位为弧度"
						}
					}
				},
				"SvgPoint": {
					"type": "object",
					"properties": {
						"type": {
							"$ref": "#/definitions/StyleTypes/definitions/SVG_POINT"
						},
						"radius": {
							"type": "number",
							"description": "从前layerV4ToV5函数来看是共有的。其中POINT，HEAT，SYMBOL图层单独设置了该属性。"
						},
						"fillColor": {
							"$ref": "#/definitions/Color"
						},
						"fillOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"strokeColor": {
							"$ref": "#/definitions/Color"
						},
						"strokeOpacity": {
							"$ref": "#/definitions/Opacity"
						},
						"strokeWidth": {
							"type": "number",
							"description": "边线宽度"
						},
						"url": {
							"type": "string"
						},
						"offsetX": {
							"type": "number",
							"description": "点符号的X方向偏移值，分数，范围-1~1"
						},
						"offsetY": {
							"type": "number",
							"description": "点符号的Y方向偏移值，分数。范围-1~1"
						},
						"rotation": {
							"type": "number",
							"description": "旋转偏移值，单位为弧度"
						}
					},
					"additionalProperties": false
				},
				"ImagePoint": {
					"description": "图片点风格",
					"type": "object",
					"properties": {
						"type": {
							"$ref": "#/definitions/StyleTypes/definitions/IMAGE_POINT"
						},
						"radius": {
							"type": "number"
						},
						"imageInfo": {
							"type": "object",
							"properties": {
								"size": {
									"type": "object",
									"properties": {
										"h": {
											"type": "number"
										},
										"w": {
											"type": "number"
										}
									}
								},
								"url": {
									"type": "string"
								}
							},
							"required": [
								"url"
							],
							"additionalProperties": false
						},
						"offsetX": {
							"type": "number",
							"description": "点符号的X方向偏移值，分数，范围-1~1"
						},
						"offsetY": {
							"type": "number",
							"description": "点符号的Y方向偏移值，分数。范围-1~1"
						},
						"rotation": {
							"type": "number",
							"description": "旋转偏移值，单位为弧度"
						}
					},
					"additionalProperties": false,
					"required": [
						"imageInfo"
					]
				}
			},
			"allOf": [
				{
					"properties": {
						"type": {
							"oneOf": [
								{
									"$ref": "#/definitions/StyleTypes/definitions/BASIC_POINT"
								},
								{
									"$ref": "#/definitions/StyleTypes/definitions/IMAGE_POINT"
								},
								{
									"$ref": "#/definitions/StyleTypes/definitions/SVG_POINT"
								},
								{
									"$ref": "#/definitions/StyleTypes/definitions/SYMBOL_POINT"
								}
							]
						}
					}
				},
				{
					"if": {
						"description": "普通点风格",
						"type": "object",
						"properties": {
							"type": {
								"$ref": "#/definitions/StyleTypes/definitions/BASIC_POINT"
							}
						}
					},
					"then": {
						"$ref": "#/definitions/PointStyle/definitions/BasicPoint"
					}
				},
				{
					"if": {
						"properties": {
							"type": {
								"$ref": "#/definitions/StyleTypes/definitions/IMAGE_POINT"
							}
						}
					},
					"then": {
						"$ref": "#/definitions/PointStyle/definitions/ImagePoint"
					}
				},
				{
					"if": {
						"properties": {
							"type": {
								"$ref": "#/definitions/StyleTypes/definitions/SYMBOL_POINT"
							}
						}
					},
					"then": {
						"$ref": "#/definitions/PointStyle/definitions/SymbolPoint"
					}
				},
				{
					"if": {
						"properties": {
							"type": {
								"$ref": "#/definitions/StyleTypes/definitions/SVG_POINT"
							}
						}
					},
					"then": {
						"$ref": "#/definitions/PointStyle/definitions/SvgPoint"
					}
				}
			]
		},
		"LineStyle": {
			"definitions": {
				"LineStyleDefinition": {
					"description": "普通线风格",
					"type": "object",
					"properties": {
						"type": {
							"$ref": "#/definitions/StyleTypes/definitions/LINE"
						},
						"strokeColor": {
							"$ref": "#/definitions/Color"
						},
						"lineDash": {
							"$ref": "#/definitions/LineDash"
						},
						"strokeWidth": {
							"type": "number"
						},
						"strokeOpacity": {
							"$ref": "#/definitions/Opacity"
						}
					},
					"additionalProperties": false
				}
			},
			"oneOf": [
				{
					"$ref": "#/definitions/LineStyle/definitions/LineStyleDefinition"
				},
				{
					"type": "array",
					"items": {
						"$ref": "#/definitions/LineStyle/definitions/LineStyleDefinition"
					},
					"additionalItems": false,
					"minItems": 1
				}
			]
		},
		"PolygonStyle": {
			"description": "普通面风格",
			"type": "object",
			"properties": {
				"type": {
					"$ref": "#/definitions/StyleTypes/definitions/POLYGON"
				},
				"fillColor": {
					"$ref": "#/definitions/Color"
				},
				"fillOpacity": {
					"$ref": "#/definitions/Opacity"
				},
				"strokeColor": {
					"$ref": "#/definitions/Color"
				},
				"lineDash": {
					"$ref": "#/definitions/LineDash"
				},
				"strokeWidth": {
					"type": "number"
				},
				"strokeOpacity": {
					"$ref": "#/definitions/Opacity"
				}
			},
			"additionalProperties": false
		},
		"Point2D": {
			"type": "object",
			"additionalProperties": false,
			"required": [
				"x",
				"y"
			],
			"properties": {
				"x": {
					"type": "number"
				},
				"y": {
					"type": "number"
				}
			}
		},
		"Rectangle2D": {
			"type": "object",
			"additionalProperties": false,
			"minProperties": 2,
			"properties": {
				"leftBottom": {
					"$ref": "#/definitions/Point2D"
				},
				"rightTop": {
					"$ref": "#/definitions/Point2D"
				}
			}
		},
		"LayerCommon": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"visible": {
					"type": "boolean"
				},
				"layerType": {
					"type": "string"
				},
				"opacity": {
					"type": "number"
				},
				"visibleScale": {
					"type": "object",
					"$comment": "存储当前图层可见的范围",
					"properties": {
						"maxScale": {
							"$ref": "#/definitions/LayerCommon/properties/visibleScale/definitions/Scale"
						},
						"minScale": {
							"$ref": "#/definitions/LayerCommon/properties/visibleScale/definitions/Scale"
						}
					},
					"definitions": {
						"Scale": {
							"type": "string",
							"pattern": "^1:\\d+\\.?\\d+$",
							"examples": [
								"1:600"
							]
						}
					}
				}
			},
			"required": [
				"layerType"
			]
		},
		"WithCredential": {
			"properties": {
				"credential": {
					"oneOf": [
						{
							"type": "object",
							"properties": {
								"token": {
									"type": "string"
								}
							},
							"additionalProperties": false
						},
						{
							"type": "object",
							"properties": {
								"key": {
									"type": "string"
								}
							},
							"additionalProperties": false
						}
					]
				}
			}
		},
		"WithEnableFields": {
			"properties": {
				"enableFields": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"additionalItems": false
				},
				"captions": {
					"type": "object",
					"description": "key为字段名，值为caption",
					"patternProperties": {
						".+": {
							"type": "string"
						}
					},
					"examples": [
						{
							"SMX": "SMXTEST",
							"ADDRESS": "ADDRESS的显示名称"
						}
					]
				}
			}
		},
		"WithPopupInfo": {
			"properties": {
				"popupInfo": {
					"type": "object",
					"additionalItems": false,
					"definitions": {
						"MediaInfo": {
							"type": "object",
							"additionalItems": false,
							"description": "媒体类型的媒体信息",
							"propertyNames": {
								"enum": [
									"type",
									"title",
									"value"
								]
							},
							"properties": {
								"title": {
									"oneOf": [
										{
											"type": "string"
										},
										{
											"$ref": "./Expressions.json#/definitions/Expressions"
										}
									],
									"description": "多媒体信息的名称"
								},
								"value": {
									"oneOf": [
										{
											"type": "string"
										},
										{
											"$ref": "./Expressions.json#/definitions/Expressions"
										}
									],
									"description": "存储媒体信息的链接，或其对应的字段名称"
								},
								"type": {
									"type": "string",
									"description": "媒体信息类型",
									"enum": [
										"IMAGE",
										"VIDEO"
									]
								}
							}
						},
						"Divider": {
							"type": "object",
							"additionalItems": false,
							"description": "DIVIDER分割类型,便于内容分块",
							"properties": {
								"type": {
									"const": "DIVIDER"
								}
							}
						},
						"FieldInfo": {
							"type": "object",
							"additionalItems": false,
							"propertyNames": {
								"enum": [
									"type",
									"fieldName"
								]
							},
							"description": "FIELD类型的字段信息",
							"properties": {
								"fieldName": {
									"type": "string"
								},
								"type": {
									"const": "FIELD"
								}
							}
						},
						"TextInfo": {
							"description": "TEXT类型的文本信息",
							"type": "object",
							"propertyNames": {
								"enum": [
									"type",
									"infos"
								]
							},
							"additionalItems": false,
							"properties": {
								"type": {
									"const": "TEXT"
								},
								"infos": {
									"type": "array",
									"description": "TEXT类型的文本信息数组",
									"items": {
										"type": "object",
										"additionalItems": false,
										"properties": {
											"insert": {
												"oneOf": [
													{
														"type": "string"
													},
													{
														"$ref": "./Expressions.json#/definitions/Expressions"
													}
												],
												"examples": [
													"concat",
													"2020人口：",
													[
														"getField",
														"人口"
													]
												]
											},
											"attributes": {
												"type": "object",
												"description": "字体样式：字体，字号，颜色，加粗，下划线, 删除线，对方方式，斜体，超链接",
												"properties": {
													"link": {
														"oneOf": [
															{
																"type": "string"
															},
															{
																"$ref": "./Expressions.json#/definitions/Expressions"
															}
														]
													},
													"font": {
														"type": "string",
														"enum": [
															"Microsoft YaHei",
															"SimSun",
															"SimHei",
															"KaiTi",
															"FangSong",
															"Arial",
															"Times-New-Roman",
															"sans-serif"
														]
													},
													"size": {
														"type": "string",
														"enum": [
															"small",
															"normal",
															"large",
															"huge"
														]
													},
													"color": {
														"type": "string"
													},
													"bold": {
														"type": "boolean"
													},
													"underline": {
														"type": "boolean"
													},
													"strike": {
														"type": "boolean"
													},
													"align": {
														"type": "string",
														"enum": [
															"right",
															"left",
															"justify",
															"center"
														]
													},
													"italic": {
														"type": "boolean"
													}
												}
											}
										}
									}
								}
							}
						}
					},
					"properties": {
						"title": {
							"oneOf": [
								{
									"type": "string"
								},
								{
									"$ref": "./Expressions.json#/definitions/Expressions"
								}
							]
						},
						"elements": {
							"type": "array",
							"description": "属性弹窗中显示的内容数组",
							"items": {
								"type": "object",
								"additionalItems": false,
								"allOf": [
									{
										"if": {
											"properties": {
												"type": {
													"type": "string",
													"enum": [
														"IMAGE",
														"VIDEO"
													]
												}
											}
										},
										"then": {
											"$ref": "#/definitions/WithPopupInfo/properties/popupInfo/definitions/MediaInfo"
										}
									},
									{
										"if": {
											"properties": {
												"type": {
													"const": "FIELD"
												}
											}
										},
										"then": {
											"$ref": "#/definitions/WithPopupInfo/properties/popupInfo/definitions/FieldInfo"
										}
									},
									{
										"if": {
											"properties": {
												"type": {
													"const": "TEXT"
												}
											}
										},
										"then": {
											"$ref": "#/definitions/WithPopupInfo/properties/popupInfo/definitions/TextInfo"
										}
									},
									{
										"if": {
											"properties": {
												"type": {
													"const": "DIVIDER"
												}
											}
										},
										"then": {
											"$ref": "#/definitions/WithPopupInfo/properties/popupInfo/definitions/Divider"
										}
									}
								]
							}
						}
					}
				}
			}
		},
		"InternetMap": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible"
				]
			},
			"properties": {
				"layerType": {
					"enum": [
						"BAIDU",
						"GOOGLE",
						"GOOGLE_CN",
						"CLOUD",
						"CLOUD_BLACK",
						"OSM",
						"BING",
						"JAPAN_RELIEF",
						"JAPAN_ORT",
						"JAPAN_PALE",
						"JAPAN_STD"
					]
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"TiandituLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"labelLayerVisible",
					"tk"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"enum": [
						"TIANDITU_VEC_4326",
						"TIANDITU_IMG_4326",
						"TIANDITU_TER_4326",
						"TIANDITU_VEC_3857",
						"TIANDITU_IMG_3857",
						"TIANDITU_TER_3857"
					]
				},
				"labelLayerVisible": {
					"type": "boolean"
				},
				"tk": {
					"$comment": "天地图key，只用于输出。Web打印服务访问天地图时需要。该字段只在访问 iportal/web/maps{id}/map.json时iportal读取配置的天地图key并加入到response中输出。",
					"type": "string"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"MarkerLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"serverId",
					"opacity",
					"visibleScale"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/MARKER"
				},
				"serverId": {
					"type": "string"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"MapStylerLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"dataSource",
					"opacity",
					"visibleScale"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/MAPBOXSTYLE"
				},
				"dataSource": {
					"type": "object",
					"properties": {
						"type": {
							"enum": [
								"PORTAL_DATA",
								"EXTERNAL"
							]
						}
					},
					"required": [
						"type"
					],
					"allOf": [
						{
							"if": {
								"properties": {
									"type": {
										"const": "PORTAL_DATA"
									}
								}
							},
							"then": {
								"$ref": "#/definitions/PortalDataSource"
							}
						},
						{
							"$comment": "保留用于以后支持外部注册的mapbox style url地址",
							"if": {
								"properties": {
									"type": {
										"const": "EXTERNAL"
									}
								}
							},
							"then": {
								"type": "object",
								"properties": {
									"type": {
										"const": "EXTERNAL"
									},
									"url": {
										"type": "string",
										"format": "uri"
									}
								},
								"required": [
									"type",
									"url"
								]
							}
						}
					]
				}
			},
			"required": [
				"dataSource"
			],
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"SearchSettingCommon": {
			"properties": {
				"name": {
					"type": "string"
				},
				"createTime": {
					"type": "string"
				},
				"attributes": {
					"type": "array",
					"items": {
						"type": "string"
					},
					"additionalItems": false
				}
			}
		},
		"SearchSetting": {
			"propertyNames": {
				"enum": [
					"name",
					"attributes",
					"createTime"
				]
			},
			"allOf": [
				{
					"$ref": "#/definitions/SearchSettingCommon"
				}
			]
		},
		"RestMapSearchSetting": {
			"propertyNames": {
				"enum": [
					"name",
					"layerName",
					"attributes",
					"createTime"
				]
			},
			"properties": {
				"layerName": {
					"type": "string"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/SearchSettingCommon"
				}
			]
		},
		"TileLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"url",
					"credential",
					"opacity",
					"searchSetting",
					"visibleScale",
					"autoUpdateTime"
				]
			},
			"type": "object",
			"description": "访问tileImage API出图的图层",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/TILE"
				},
				"url": {
					"type": "string",
					"format": "uri"
				},
				"searchSetting": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/RestMapSearchSetting"
					},
					"additionalItems": false
				},
				"autoUpdateTime": {
					"type": "number",
					"$comment": "自动更新数据的时间，单位是毫秒"
				}
			},
			"required": [
				"url"
			],
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				},
				{
					"$ref": "#/definitions/WithCredential"
				}
			]
		},
		"HostedTileLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"serverId",
					"opacity",
					"visibleScale",
					"autoUpdateTime"
				]
			},
			"type": "object",
			"description": "访问tileImage API出图的图层",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/HOSTED_TILE"
				},
				"serverId": {
					"type": "string"
				},
				"autoUpdateTime": {
					"type": "number",
					"$comment": "自动更新数据的时间，单位是毫秒"
				}
			},
			"required": [
				"serverId"
			],
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"WMTSLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"url",
					"layer",
					"tileMatrixSet",
					"opacity",
					"visibleScale",
					"requestEncoding",
					"dpi"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/WMTS"
				},
				"url": {
					"type": "string",
					"format": "uri"
				},
				"layer": {
					"type": "string",
					"$comment": "Layer参数"
				},
				"tileMatrixSet": {
					"type": "string",
					"$comment": "TileMatrixSet参数"
				},
				"requestEncoding": {
					"type": "string",
					"$comment": "requestEncoding参数",
					"oneOf": [
						{
							
							"const": "KVP"
						},
						{
							
							"const": "REST"
						}
					]
				},
				"dpi": {
					"type": "number",
					"$comment": "dpi值"
				}
			},
			"required": [
				"url",
				"layer",
				"tileMatrixSet"
			],
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"WMSLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"layerType",
					"visible",
					"url",
					"layers",
					"opacity",
					"visibleScale"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/WMS"
				},
				"url": {
					"type": "string",
					"format": "uri"
				},
				"layers": {
					"$comment": "即GetMap请求中的LAYERS参数",
					"type": "array",
					"items": {
						"type": "string"
					},
					"additionalItems": false
				}
			},
			"required": [
				"url",
				"layers"
			],
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"FeatureTypes": {
			"definitions": {
				"POINT": {
					"const": "POINT"
				},
				"LINE": {
					"const": "LINE"
				},
				"POLYGON": {
					"const": "POLYGON"
				}
			}
		},
		"UniqueThemeSetting": {
			"propertyNames": {
				"enum": [
					"themeField",
					"colors",
					"customSettings"
				]
			},
			"properties": {
				"themeField": {
					"type": "string"
				},
				"colors": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/Color"
					}
				}
			}
		},
		"RangeThemeCommon": {
			"required": [
				"themeField",
				"segmentMethod",
				"segmentCount"
			],
			"properties": {
				"themeField": {
					"type": "string"
				},
				"segmentMethod": {
					"type": "string",
					"enum": [
						"offset",
						"jenks",
						"square",
						"logarithm"
					]
				},
				"segmentCount": {
					"type": "integer"
				},
				"customSettings": {
					"patternProperties": {
						".+": {
							"type": "object",
							"properties": {
								"segment": {
									"additionalProperties": false,
									"properties": {
										"start": {
											"type": "number"
										},
										"end": {
											"type": "number"
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"RangeThemeSetting": {
			"propertyNames": {
				"enum": [
					"themeField",
					"segmentMethod",
					"segmentCount",
					"customSettings",
					"colors"
				]
			},
			"properties": {
				"customSettings": {
					"patternProperties": {
						".+": {
							"type": "object",
							"propertyNames": {
								"enum": [
									"color",
									"segment"
								]
							},
							"properties": {
								"color": {
									"$ref": "#/definitions/Color"
								}
							}
						}
					}
				},
				"colors": {
					"type": "array",
					"additionalItems": false,
					"items": {
						"$ref": "#/definitions/Color"
					}
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/RangeThemeCommon"
				}
			]
		},
		"RankSymbolThemeSetting": {
			"propertyNames": {
				"enum": [
					"themeField",
					"segmentMethod",
					"segmentCount",
					"customSettings",
					"minRadius",
					"maxRadius",
					"colors"
				]
			},
			"properties": {
				"minRadius": {
					"type": "number"
				},
				"maxRadius": {
					"type": "number"
				},
				"customSettings": {
					"patternProperties": {
						".+": {
							"type": "object",
							"propertyNames": {
								"enum": [
									"segment",
									"radius",
									"color"
								]
							},
							"properties": {
								"radius": {
									"type": "number"
								},
								"color": {
									"$ref": "#/definitions/Color"
								}
							}
						}
					}
				},
				"colors": {
					"type": "array",
					"additionalItems": false,
					"items": {
						"$ref": "#/definitions/Color"
					}
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/RangeThemeCommon"
				}
			]
		},
		"LegendSetting": {
			"additionalProperties": false,
			"properties": {
				"isShow": {
					"type": "boolean"
				},
				"isFold": {
					"type": "boolean"
				}
			}
		},
		"DataflowPointTrackLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"visible",
					"layerType",
					"url",
					"opacity",
					"lineStyle",
					"pointStyle",
					"credential",
					"directionField",
					"labelStyle",
					"filterCondition",
					"enableFields",
					"popupInfo",
					"legendSetting",
					"identifyField",
					"maxPointCount",
					"captions",
					"visibleScale"
				]
			},
			"properties": {
				"url": {
					"type": "string",
					"format": "uri"
				},
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_POINT_TRACK"
				},
				"lineStyle": {
					"$ref": "#/definitions/LineStyle"
				},
				"pointStyle": {
					"$ref": "#/definitions/PointStyle"
				},
				"labelStyle": {
					"$ref": "#/definitions/LabelStyle"
				},
				"filterCondition": {
					"type": "string"
				},
				"legendSetting": {
					"$ref": "#/definitions/LegendSetting"
				},
				"identifyField": {
					"type": "string"
				},
				"maxPointCount": {
					"type": "integer"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				},
				{
					"$ref": "#/definitions/WithCredential"
				},
				{
					"$ref": "#/definitions/WithEnableFields"
				},
				{
					"$ref": "#/definitions/WithPopupInfo"
				}
			]
		},
		"VectorLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"visible",
					"layerType",
					"dataSource",
					"projection",
					"featureType",
					"style",
					"xyField",
					"labelStyle",
					"themeSetting",
					"legendSetting",
					"filterCondition",
					"enableFields",
					"popupInfo",
					"captions",
					"opacity",
					"searchSetting",
					"visibleScale",
					"autoUpdateTime"
				]
			},
			"type": "object",
			"required": [
				"dataSource"
			],
			"properties": {
				"dataSource": {
					"$ref": "#/definitions/DataSource"
				},
				"layerType": {
					"oneOf": [
						{
							"$ref": "#/definitions/LayerTypes/definitions/VECTOR"
						},
						{
							"$ref": "#/definitions/LayerTypes/definitions/UNIQUE"
						},
						{
							"$ref": "#/definitions/LayerTypes/definitions/RANGE"
						},
						{
							"$ref": "#/definitions/LayerTypes/definitions/RANK_SYMBOL"
						}
					]
				},
				"projection": {
					"$ref": "#/definitions/Projection"
				},
				"featureType": {
					"oneOf": [
						{
							"$ref": "#/definitions/FeatureTypes/definitions/POINT"
						},
						{
							"$ref": "#/definitions/FeatureTypes/definitions/LINE"
						},
						{
							"$ref": "#/definitions/FeatureTypes/definitions/POLYGON"
						}
					]
				},
				"xyField": {
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"xField": {
							"type": "string"
						},
						"yField": {
							"type": "string"
						}
					},
					"required": [
						"xField",
						"yField"
					]
				},
				"style": {
					"$comment": "详细字段根据点线面不同",
					"required": [
						"type"
					]
				},
				"labelStyle": {
					"$ref": "#/definitions/LabelStyle"
				},
				"legendSetting": {
					"$ref": "#/definitions/LegendSetting"
				},
				"searchSetting": {
					"type": "array",
					"$comment": "根据数据源类型rest-map,rest-data各不相同"
				},
				"autoUpdateTime": {
					"type": "number",
					"$comment": "自动更新数据的时间，单位是毫秒"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				},
				{
					"$ref": "#/definitions/WithEnableFields"
				},
				{
					"$ref": "#/definitions/WithPopupInfo"
				},
				{
					"$comment": "PointStyle",
					"if": {
						"type": "object",
						"properties": {
							"featureType": {
								"$ref": "#/definitions/FeatureTypes/definitions/POINT"
							}
						}
					},
					"then": {
						"type": "object",
						"properties": {
							"style": {
								"$ref": "#/definitions/PointStyle"
							}
						}
					}
				},
				{
					"$comment": "LineStyle",
					"if": {
						"type": "object",
						"properties": {
							"featureType": {
								"$ref": "#/definitions/FeatureTypes/definitions/LINE"
							}
						}
					},
					"then": {
						"type": "object",
						"properties": {
							"style": {
								"$ref": "#/definitions/LineStyle"
							}
						}
					}
				},
				{
					"$comment": "PolygonStyle",
					"if": {
						"type": "object",
						"properties": {
							"featureType": {
								"$ref": "#/definitions/FeatureTypes/definitions/POLYGON"
							}
						}
					},
					"then": {
						"type": "object",
						"properties": {
							"style": {
								"$ref": "#/definitions/PolygonStyle"
							}
						}
					}
				},
				{
					"$comment": "unique",
					"if": {
						"type": "object",
						"properties": {
							"layerType": {
								"$ref": "#/definitions/LayerTypes/definitions/UNIQUE"
							}
						}
					},
					"then": {
						"allOf": [
							{
								"type": "object",
								"properties": {
									"themeSetting": {
										"$ref": "#/definitions/UniqueThemeSetting"
									}
								},
								"required": [
									"themeSetting"
								]
							},
							{
								"oneOf": [
									{
										"type": "object",
										"properties": {
											"featureType": {
												"$ref": "#/definitions/FeatureTypes/definitions/POINT"
											},
											"themeSetting": {
												"properties": {
													"customSettings": {
														"additionalProperties": {
															"oneOf": [
																{
																	"$ref": "#/definitions/Color"
																},
																{
																	"$ref": "#/definitions/PointStyle"
																}
															]
														}
													}
												}
											}
										}
									},
									{
										"type": "object",
										"properties": {
											"featureType": {
												"$ref": "#/definitions/FeatureTypes/definitions/LINE"
											},
											"themeSetting": {
												"properties": {
													"customSettings": {
														"additionalProperties": {
															"oneOf": [
																{
																	"$ref": "#/definitions/Color",
																	"description": "预计将于2021年，不再使用该参数"
																},
																{
																	"$ref": "#/definitions/LineStyle"
																}
															]
														}
													}
												}
											}
										}
									},
									{
										"type": "object",
										"properties": {
											"featureType": {
												"$ref": "#/definitions/FeatureTypes/definitions/POLYGON"
											},
											"themeSetting": {
												"properties": {
													"customSettings": {
														"additionalProperties": {
															"oneOf": [
																{
																	"$ref": "#/definitions/Color"
																},
																{
																	"$ref": "#/definitions/PolygonStyle"
																}
															]
														}
													}
												}
											}
										}
									}
								]
							}
						]
					}
				},
				{
					"$comment": "range",
					"if": {
						"type": "object",
						"properties": {
							"layerType": {
								"$ref": "#/definitions/LayerTypes/definitions/RANGE"
							}
						}
					},
					"then": {
						"type": "object",
						"properties": {
							"themeSetting": {
								"$ref": "#/definitions/RangeThemeSetting"
							}
						},
						"required": [
							"themeSetting"
						]
					}
				},
				{
					"$comment": "等级符号专题图",
					"if": {
						"type": "object",
						"properties": {
							"layerType": {
								"$ref": "#/definitions/LayerTypes/definitions/RANK_SYMBOL"
							}
						}
					},
					"then": {
						"type": "object",
						"properties": {
							"themeSetting": {
								"$ref": "#/definitions/RankSymbolThemeSetting"
							},
							"featureType": {
								"$ref": "#/definitions/FeatureTypes/definitions/POINT"
							},
							"style": {
								"$ref": "#/definitions/PointStyle"
							}
						},
						"required": [
							"themeSetting"
						]
					}
				},
				{
					"if": {
						"properties": {
							"dataSource": {
								"properties": {
									"type": {
										"$ref": "#/definitions/DataSource/definitions/Type/definitions/REST_MAP"
									}
								}
							}
						}
					},
					"then": {
						"properties": {
							"searchSetting": {
								"type": "array",
								"items": {
									"$ref": "#/definitions/RestMapSearchSetting"
								},
								"additionalItems": false
							}
						}
					}
				},
				{
					"if": {
						"properties": {
							"dataSource": {
								"properties": {
									"type": {
										"$ref": "#/definitions/DataSource/definitions/Type/definitions/REST_DATA"
									}
								}
							}
						}
					},
					"then": {
						"properties": {
							"searchSetting": {
								"type": "array",
								"items": {
									"$ref": "#/definitions/SearchSetting"
								},
								"additionalItems": false
							}
						}
					}
				},
				{
					"if": {
						"properties": {
							"dataSource": {
								"propertyNames": {
									"enum": ["type", "serverId"]
								},
								"properties": {
									"type": {
										"$ref": "#/definitions/DataSource/definitions/Type/definitions/PORTAL_DATA"
									}
								}
							}
						}
					},
					"then": {
						"properties": {
							"searchSetting": {
								"type": "array",
								"items": {
									"$ref": "#/definitions/SearchSetting"
								},
								"additionalItems": false
							}
						}
					}
				},
				{
					"if": {
						"properties": {
							"dataSource": {
								"properties": {
									"accessType": {
										"$ref": "#/definitions/PortalDataSource/definitions/REST_DATA"
									},
									"type": {
										"$ref": "#/definitions/DataSource/definitions/Type/definitions/PORTAL_DATA"
									}
								}
							}
						}
					},
					"then": {
						"properties": {
							"searchSetting": {
								"type": "array",
								"items": {
									"$ref": "#/definitions/SearchSetting"
								},
								"additionalItems": false
							}
						}
					}
				},
				{
					"if": {
						"properties": {
							"dataSource": {
								"properties": {
									"accessType": {
										"$ref": "#/definitions/PortalDataSource/definitions/REST_MAP"
									},
									"type": {
										"$ref": "#/definitions/DataSource/definitions/Type/definitions/PORTAL_DATA"
									}
								}
							}
						}
					},
					"then": {
						"properties": {
							"searchSetting": {
								"$ref": "#/definitions/RestMapSearchSetting"
							}
						}
					}
				}
			]
		},
		"PortalDataSource": {
			"type": "object",
			"additionalProperties": false,
			"propertyNames": {
				"enum": ["type", "serverId", "accessType", "administrativeInfo"]
			},
			"required": [
				"type",
				"serverId"
			],
			"properties": {
				"type": {
					"$ref": "#/definitions/DataSource/definitions/Type/definitions/PORTAL_DATA"
				},
				"serverId": {
					"type": "string"
				},
				"accessType": {
					"oneOf": [
						{
							"$ref": "#/definitions/PortalDataSource/definitions/DIRECT"
						},
						{
							"$ref": "#/definitions/PortalDataSource/definitions/REST_DATA"
						},
						{
							"$ref": "#/definitions/PortalDataSource/definitions/REST_MAP"
						}
					]
				},
				"administrativeInfo": {
					"properties": {
						"divisionType": {
							"enum": ["Province", "City", "GB-T_2260"]
						},
						"divisionField": {
							"type":"string"
						}
					}
				}
			},
			"allOf": [
				{
					"$comment": "",
					"if": {
						"not": {
							"properties": {
								"accessType": {
									"$ref": "#/definitions/PortalDataSource/definitions/DIRECT"
								}
							}

						}
					},
					"then": {
						"propertyNames": {
							"enum": ["type", "serverId", "accessType"]
						}

					}
				}
			],
			"definitions": {
				"DIRECT": {
					"const": "DIRECT"
				},
				"REST_MAP": {
					"const": "REST_MAP"
				},
				"REST_DATA": {
					"const": "REST_DATA"
				}
			}
		},
		"DataSource": {
			"definitions": {
				"RestData":
				{
					"type": "object",
					"additionalProperties": false,
					"required": [
						"type",
						"url",
						"dataSourceName"
					],
					"properties": {
						"type": {
							"$ref": "#/definitions/DataSource/definitions/Type/definitions/REST_DATA"
						},
						"url": {
							"type": "string",
							"pattern": "^https?://.+/services/.+/.+/data(\\?.*)?$"
						},
						"dataSourceName": {
							"type": "string",
							"pattern": "^.+:.+$"
						}
					}
				},
				"Type": {
					"definitions": {
						"REST_DATA": {
							"const": "REST_DATA"
						},
						"REST_MAP": {
							"const": "REST_MAP"
						},
						"PORTAL_DATA": {
							"const": "PORTAL_DATA"
						},
						"SAMPLE_DATA": {
							"const": "SAMPLE_DATA"
						},
						"USER_DATA": {
							"const": "USER_DATA"
						}
					}
				},
				"SampleData": {
					"type": "object",
					"additionalProperties": false,
					"required": [
						"type",
						"name"
					],
					"properties": {
						"type": {
							"$ref": "#/definitions/DataSource/definitions/Type/definitions/SAMPLE_DATA"
						},
						"name": {
							"type": "string",
							"enum": ["BeijingResidentialDistrict","BeijingSubwayLine","ChinaEarthquakeIntensityZone","ChinaMeteorologicalObservationStation","ChinaRecordOfOver6Earthquakes","GlobalRecordOfOver7Earthquakes","Sacramentorealestatetransactions","SalesJan2009"]
						}
					}
				},
				"UserData": {
					"type": "object",
					"additionalProperties": false,
					"required": [
						"type",
						"url"
					],
					"properties": {
						"type": {
							"$ref": "#/definitions/DataSource/definitions/Type/definitions/USER_DATA"
						},
						"url": {
							"type": "string",
							"format":"uri"
						}
					}
				}
			},
			"oneOf": [
				{
					"$ref": "#/definitions/PortalDataSource"
				},
				{
					"$ref": "#/definitions/DataSource/definitions/RestData"
				},
				{
					"type": "object",
					"additionalProperties": false,
					"required": [
						"type",
						"url",
						"layerName"
					],
					"properties": {
						"type": {
							"$ref": "#/definitions/DataSource/definitions/Type/definitions/REST_MAP"
						},
						"url": {
							"type": "string",
							"pattern": "^https?://.+/services/.+/.+/maps/[^/]+(\\?.*)?$"
						},
						"layerName": {
							"type": "string"
						}
					}
				},
				{
					"$ref": "#/definitions/DataSource/definitions/SampleData"
				},
				{
					"$ref": "#/definitions/DataSource/definitions/UserData"
				}
			]
		},
		"HeatLayerThemeSetting": {
			"type": "object",
			"properties": {
				"customSettings": {
					"patternProperties": {
						"\\d+": {
							"$ref": "#/definitions/Color"
						}
					}
				},
				"weight": {
					"type": "string"
				},
				"radius": {
					"type": "number"
				},
				"colors": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/Color"
					}
				}
			}
		},
		"HeatLayerCommon": {
			"type": "object",
			"properties": {
				"filterCondition": {
					"type": "string"
				},
				"legendSetting": {
					"$ref": "#/definitions/LegendSetting"
				},
				"themeSetting": {
					"$ref": "#/definitions/HeatLayerThemeSetting"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				}
			]
		},
		"HeatLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"visible",
					"layerType",
					"dataSource",
					"projection",
					"featureType",
					"themeSetting",
					"xyField",
					"filterCondition",
					"legendSetting",
					"opacity",
					"captions",
					"visibleScale",
					"autoUpdateTime"
				]
			},
			"type": "object",
			"properties": {
				"dataSource": {
					"$ref": "#/definitions/DataSource"
				},
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/HEAT"
				},
				"featureType": {
					"$ref": "#/definitions/FeatureTypes/definitions/POINT"
				},
				"projection": {
					"$ref": "#/definitions/Projection"
				},
				"autoUpdateTime": {
					"type": "number",
					"$comment": "自动更新数据的时间，单位是毫秒"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/HeatLayerCommon"
				}
			]
		},
		"DataflowHeatLayer": {
			"propertyNames": {
				"enum": [
					"name",
					"visible",
					"layerType",
					"url",
					"themeSetting",
					"filterCondition",
					"legendSetting",
					"opacity",
					"identifyField",
					"credential",
					"captions",
					"visibleScale"
				]
			},
			"type": "object",
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/DATAFLOW_HEAT"
				},
				"url": {
					"type": "string",
					"format": "uri"
				},
				"identifyField": {
					"type": "string"
				}
			},
			"allOf": [
				{
					"$ref": "#/definitions/HeatLayerCommon"
				},
				{
					"$ref": "#/definitions/WithCredential"
				}
			]
		},
		"MigrationLayer": {
			"propertyNames": {"enum": [
				"name",
				"visible",
				"layerType",
				"dataSource",
				"opacity",
				"from",
				"to",
				"lineSetting",
				"animationSetting",
				"labelSetting",
				"enableFields",
				"featureType",
				"legendSetting",
				"projection",
				"captions",
				"visibleScale",
				"autoUpdateTime"
			]},
			"properties": {
				"layerType": {
					"$ref": "#/definitions/LayerTypes/definitions/MIGRATION"
				},
				"featureType": {
					"oneOf": [
						{
							"$ref": "#/definitions/FeatureTypes/definitions/POINT"
						},
						{
							"$ref": "#/definitions/FeatureTypes/definitions/POLYGON"
						}
					]
				},
				"projection": {
					"$ref": "#/definitions/Projection"
				},
				"from": {
					"$ref": "#/definitions/MigrationLayer/definitions/Position"
				},
				"to": {
					"$ref": "#/definitions/MigrationLayer/definitions/Position"
				},
				"dataSource": {
					"oneOf": [
						{

							"$ref": "#/definitions/PortalDataSource"
						},
						{
							"$ref": "#/definitions/DataSource/definitions/SampleData"
						},
						{
							"$ref": "#/definitions/DataSource/definitions/RestData"
						},
						{
							"$ref": "#/definitions/DataSource/definitions/UserData"
						}
					]
				},
				"lineSetting": {
					"properties": {
						"color": {
							"$ref": "#/definitions/Color"
						},
						"type": {
							"enum": [
								"solid",
								"dashed",
								"dotted"
							]
						},
						"width": {
							"type":"number"
						},
						"opacity": {
							"$ref": "#/definitions/Opacity"
						},
						"curveness": {
							"type": "number",
							"minimum": 0,
							"maximum": 1
						}
					},
					"additionalProperties": false
				},
				"animationSetting": {
					"properties": {
						"show": {
							"type": "boolean"
						},
						"period": {
							"type": "number"
						},
						"trailLength": {
							"type": "number"
						},
						"constantSpeed": {
							"type": "number"
						},
						"symbol": {
							"type": "string",
							"examples": [
								"image://http://xxx.xxx.xxx/a/b.png",
								"image://data:image/gif;base64,R0lGOD......",
								"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z"
							]
						},
						"symbolSize": {
							"type": "number"
						}
					},
					"additionalProperties": false
				},
				"labelSetting": {
					"properties": {
						"show": {
							"type": "boolean"
						},
						"from": {
							"type": "string"
						},
						"to": {
							"type": "string"
						},
						"color": {
							"$ref": "#/definitions/Color"
						},
						"fontFamily": {
							"type": "string",
							"examples": [
								"Microsoft YaHei"
							]
						}
					},
					"additionalProperties": false
				},
				"legendSetting": {
					"$ref": "#/definitions/LegendSetting"
				},
				"autoUpdateTime": {
					"type": "number",
					"$comment": "自动更新数据的时间，单位是毫秒"
				}

			},
			"allOf": [
				{
					"$ref": "#/definitions/LayerCommon"
				},
				{
					"$ref": "#/definitions/WithEnableFields"
				}
			],
			"definitions": {
				"Position": {
					"oneOf": [
						{
							"propertyNames": {
								"enum": [
									"type",
									"xField",
									"yField"
								]
							},
							"properties": {
								"type": {
									"const": "XY_FIELD"
								},
								"xField": {
									"type": "string"
								},
								"yField": {
									"type": "string"
								}
							},
							"required": ["type"]

						},
						{
							"propertyNames": {
								"enum": [
									"type",
									"field"
								]
							},
							"properties": {
								"type": {
									"const": "PLACE_FIELD"
								},
								"field": {
									"type": "string"
								}
							},
							"required": ["type"]

						}
					]
				}
			}
		},
		"Graticule": {
			"description": "经纬网",
			"propertyNames": {
				"enum": [
					"visible",
					"extent",
					"strokeColor",
					"strokeWidth",
					"lineDash",
					"interval",
					"lonLabelStyle",
					"latLabelStyle"
				]
			},
			"type": "object",
			"properties": {
				"visible": {
					"type": "boolean"
				},
				"extent": {
					"type": "array",
					"items": {
						"type": "number"
					},
					"minItems": 4,
					"maxItems": 4,
					"additionalItems": false
				},
				"strokeColor": {
					"$ref": "#/definitions/Color"
				},
				"strokeWidth": {
					"type": "number"
				},
				"lineDash": {
					"type": "array",
					"items": {
						"type": "number"
					},
					"additionalItems": false
				},
				"interval": {
					"type": "array",
					"items": {
						"type": "number"
					},
					"minItems": 1,
					"additionalItems": false
				},
				"lonLabelStyle": {
					"$ref": "#/definitions/LabelStyle"
				},
				"latLabelStyle": {
					"$ref": "#/definitions/LabelStyle"
				}
			}
		}
	}
}