# 要素查询
# 配置规范
// 这个文件描述要素查询微件配置信息
{
// 查询类型
"queryType": [
{
// 图标,显示在要素查询面板中的图标
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M511.998 327.419c-101.94 0-184.576 82.642-184.576 184.577s82.642 184.582 184.576 184.582c101.946 0 184.581-82.647 184.581-184.582 0-101.942-82.635-184.577-184.581-184.577z\"/></svg>",
// 查询类型id
"id": "Point",
// 类型标签,显示在要素查询面板中,鼠标放到图标上显示的提示信息
"label": "点"
}
// ...
],
// 设置要素查询微件打开时鼠标的样式,默认为default箭头显示,可修改为grab以手型显示
"cursorType":"default"
}
# 支持的查询类型
查询类型 | 查询类型描述 | 地图模式 |
---|---|---|
Point | 点查询 | 2D、3D |
Circle | 圆查询 | 2D |
Rectangle | 矩形查询 | 2D |
Polygon | 多边形查询 | 2D、3D |
LineString | 线查询 | 2D、3D |
Cube | 立方体查询 | 3D |
PickModel | 模型拾取查询(暂不支持) | 3D |
# 默认配置
{
"queryType": [
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M511.998 327.419c-101.94 0-184.576 82.642-184.576 184.577s82.642 184.582 184.576 184.582c101.946 0 184.581-82.647 184.581-184.582 0-101.942-82.635-184.577-184.581-184.577z\"/></svg>",
"id": "Point",
"label": "点"
},
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1151 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"143.875\" height=\"128\"><defs><style/></defs><path d=\"M511.977 1024a511.977 511.977 0 1 1 503.018-607.973h72.957v191.991h-72.957A512.17 512.17 0 0 1 511.977 1024zm511.978-543.976h-95.996v63.997h95.996v-63.997zM863.962 608.018v-63.997l-296.563.064a63.997 63.997 0 1 1 0-64.06h296.563v-63.998h85.692a447.98 447.98 0 1 0 0 191.991h-85.692z\"/></svg>",
"id": "Circle",
"label": "圆"
},
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M256 864a96 96 0 1 1-96-96V256a96 96 0 1 1 96-96h512a96 96 0 1 1 96 96v512a96 96 0 1 1-96 96H256zm-24.448-64h560.896a96.64 96.64 0 0 1 7.552-7.552V231.552a96.64 96.64 0 0 1-7.552-7.552H231.552a96.64 96.64 0 0 1-7.552 7.552v560.896c2.624 2.368 5.12 4.928 7.552 7.552z\"/></svg>",
"id": "",
"label": "矩形"
},
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M883.2 238.933c-53.333 0-98.133 44.8-98.133 98.134 0 19.2 6.4 36.266 14.933 51.2L680.533 507.733c-14.933-10.666-32-14.933-51.2-14.933-27.733 0-53.333 12.8-70.4 29.867l-87.466-51.2v-8.534c0-53.333-44.8-98.133-98.134-98.133s-96 44.8-96 98.133c0 14.934 4.267 27.734 8.534 40.534L192 608c-14.933-8.533-29.867-12.8-46.933-12.8-53.334 0-98.134 44.8-98.134 98.133s44.8 96 98.134 96 98.133-44.8 98.133-98.133c0-21.333-6.4-40.533-19.2-57.6l87.467-96c17.066 14.933 38.4 23.467 61.866 23.467 36.267 0 66.134-19.2 83.2-49.067l78.934 46.933c-4.267 10.667-6.4 19.2-6.4 29.867 0 53.333 44.8 98.133 98.133 98.133s98.133-44.8 98.133-98.133c0-19.2-6.4-36.267-14.933-51.2l119.467-119.467c14.933 10.667 32 14.934 51.2 14.934 53.333 0 98.133-44.8 98.133-98.134s-42.667-96-96-96z\"/></svg>",
"id": "LineString",
"label": "线"
},
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M429.15 14.897c-45.775 0-82.85 37.076-82.85 82.85v2.61L136.562 232.38a83.223 83.223 0 0 0-38.815-10.357c-45.775 0-82.85 37.076-82.85 82.85 0 30.573 16.652 56.795 41.425 71.21v478.918c-24.773 14.416-41.426 40.597-41.426 71.21 0 45.775 37.076 82.85 82.85 82.85 30.573 0 56.795-16.653 71.21-41.425H689.3c14.416 24.772 40.597 41.425 71.21 41.425 45.775 0 82.85-37.075 82.85-82.85 0-16.487-4.556-32.353-12.966-45.32l101.036-203.19a83.058 83.058 0 0 0 10.357-164.417l-78.957-236.87c13.09-14.747 21.997-33.222 21.997-54.39 0-45.775-37.076-82.851-82.85-82.851-21.21 0-39.644 8.906-54.392 21.997L510.757 80.93a83.348 83.348 0 0 0-81.607-66.033zm54.39 144.989l236.87 77.672c6.338 33.347 32.726 59.694 66.032 66.032L865.4 539.175a82.436 82.436 0 0 0-21.997 55.675c0 17.15 5.344 33.348 14.25 46.604l-102.28 201.948a82.353 82.353 0 0 0-66.032 41.425H169a82.063 82.063 0 0 0-29.826-29.785V376.125c24.772-14.416 41.425-40.596 41.425-71.21v-2.61l209.736-132.022c11.6 6.131 24.731 10.357 38.816 10.357 20.878 0 39.768-7.913 54.39-20.713z\"/></svg>",
"id": "Polygon",
"label": "多边形"
},
{
"icon": "<svg t=\"1640767473409\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http: //www.w3.org/2000/svg\" p-id=\"6999\" width=\"200\" height=\"200\"><path d=\"M430.08 0l588.8 282.88v499.84L611.2 1024 4.48 668.16V192zM100.48 293.76v320l462.72 271.36v-345.6z m823.04 99.84L659.2 538.88v345.6l264.32-156.16V393.6zM428.8 105.6l-256 117.12 438.4 233.6 256-140.8L428.8 105.6z\" p-id=\"7000\"></path></svg>",
"id": "Cube",
"label": "立方体"
},
{
"icon": "<svg class=\"icon\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" width=\"128\" height=\"128\"><defs><style/></defs><path d=\"M96 128c-17.728 0-32 14.272-32 32v550.272c0 9.472 4.032 18.24 11.008 24.256l176 153.472c5.76 5.248 13.248 8 20.992 8h304v-64H320V320h512v256l64 64V280a31.872 31.872 0 0 0-16.512-28.032l-216-119.936A33.28 33.28 0 0 0 648 128zm105.728 64h438.016l115.2 64H297.792zM128 219.776l128 85.248v502.72L128 696zm579.2 420.736c-1.216-1.024-3.2-.256-3.2 1.28V960l77.76-63.232 46.272 111.488 6.72 15.744 47.488-19.2-54.016-127.552L944 863.232z\"/></svg>",
"id": "PickModel",
"label": "模型拾取"
}
]
}