{
    "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
    "data": {
        "properties": {
            "locationType": {
                "enum": [
                    {
                        "label": "无",
                        "value": 1
                    },
                    {
                        "label": "用户当前位置",
                        "value": 2
                    }
                ],
                "type": "string",
                "title": "默认显示位置",
                "default": 1,
                "x-index": 3
            },
            "dataSource": {
                "type": "object",
                "title": "地图数据源",
                "default": {},
                "description": "小程序会调用微信官方接口实现定位，请确保已通过相关接口申请，详细说明可查看该组件说明文档",
                "x-index": 20,
                "x-props": {
                    "data-hidebind": true,
                    "itemClassName": "ds-bind-form-item"
                },
                "x-component": "data-source-select",
                "x-component-props": {
                    "dsType": "cloud-integration",
                    "subType": "connector",
                    "provider": "tencent-map",
                    "showReload": true
                },
                "required": true
            },
            "label": {
                "type": "string",
                "default": "地图定位",
                "title": "标题"
            },
            "value": {
                "type": "object",
                "title": "默认值",
                "x-category": "基础属性",
                "x-component": "jsontext",
                "properties": {
                    "address": {
                        "description": "地点名称",
                        "type": "string",
                        "default": ""
                    },
                    "geopoint": {
                        "description": "经纬度",
                        "type": "object",
                        "properties": {
                            "coordinates": {
                                "x-required": true,
                                "type": "array",
                                "items": {
                                    "minItems": 2,
                                    "maxItems": 2,
                                    "type": "number"
                                }
                            },
                            "type": {
                                "x-required": true,
                                "type": "string"
                            }
                        },
                        "default": {
                            "coordinates": [39.98410411, 116.307503],
                            "type": "Point"
                        }
                    }
                },
                "default": {
                    "address": "",
                    "geopoint": {
                        "coordinates": [39.98410411, 116.307503],
                        "type": "Point"
                    }
                }
            },
            "labelVisible": {
                "type": "boolean",
                "default": true,
                "title": "显示标题"
            },
            "showLngLat": {
                "type": "boolean",
                "default": false,
                "title": "显示经纬度"
            },
            "showMap": {
                "type": "boolean",
                "default": false,
                "title": "显示地图"
            },
            "defauleShowLocation": {
                "type": "boolean",
                "default": true,
                "title": "默认显示当前位置"
            },
            "drag": {
                "type": "boolean",
                "default": true,
                "title": "允许拖动"
            },
            "zoom": {
                "type": "boolean",
                "default": true,
                "title": "允许缩放"
            },
            "disabled": {
                "type": "boolean",
                "default": false,
                "title": "是否禁用"
            },
            "requiredFlag": {
                "type": "boolean",
                "default": false,
                "title": "是否显示必填标记"
            },
            "layout": {
                "title": "布局方式",
                "type": "string",
                "default": "horizontal",
                "enum": [
                    {
                        "label": "水平",
                        "value": "horizontal"
                    },
                    {
                        "label": "垂直",
                        "value": "vertical"
                    }
                ]
            },
            "locationRange": {
                "enum": [
                    {
                        "label": "不限",
                        "value": 0
                    },
                    {
                        "label": "100米内",
                        "value": 100
                    },
                    {
                        "label": "300米内",
                        "value": 300
                    },
                    {
                        "label": "500米内",
                        "value": 500
                    },
                    {
                        "label": "1000米内",
                        "value": 1000
                    },
                    {
                        "label": "2000米内",
                        "value": 2000
                    },
                    {
                        "label": "自定义",
                        "value": -1
                    }
                ],
                "type": "string",
                "title": "默认显示位置",
                "default": 0,
                "x-linkages": [
                    {
                        "type": "value:visible",
                        "target": "*(customRange)",
                        "condition": "{{$self.value===-1}}"
                    }
                ]
            },
            "customRange": {
                "title": "自定义范围米",
                "default": 0,
                "type": "number"
            }
        }
    },
    "meta": {
        "title": "地图定位",
        "description": "地图定位",
        "category": "表单",
        "icon": "../../icons/Location.svg",
        "validate": [
            {
                "rule": "checkMapHost",
                "options": {
                    "allowFailure": false,
                    "title": "地图定位组件所需服务器域名添加失败",
                    "description": "地图组件域名分析未通过，详情请查看说明",
                    "type": "mp",
                    "version": ""
                }
            }
        ],
        "visible": []
    },
    "events": [
        {
            "name": "change",
            "title": "选择定位坐标改变"
        }
    ]
}
