{ "name": "smartCity-polygon", "version": "1.0.2", "description": "smartCity-polygon子组件", "main": "index.js", "scripts": { "build": "cube build ./ --output=../../datavComponent --remote=pandav --smart" }, "keywords": [ "map", "subcoms" ], "dependencies": { "eventemitter3": "3.0.0", "safely-merge": "1.0.1", "lodash": "4.17.11" }, "pandav": { "cn_name": "多边形面", "level": 1, "protocol": 2, "type": [ "smartCity-v1_subcoms_polygon" ], "parent": { "supportTypes": [ "smartCity-v1" ], "supportNames": [] }, "events": { "click": { "name": "鼠标点击" } }, "publicHandler": {}, "api_data": { "source": [ { "type": "Feature", "properties": { "name": "区域面01" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 121.152086, 30.034523 ], [ 121.153879, 30.035804 ], [ 121.155167, 30.036316 ], [ 121.15743, 30.036181 ], [ 121.161243, 30.035593 ], [ 121.164185, 30.035246 ], [ 121.16812, 30.034659 ], [ 121.169756, 30.034508 ], [ 121.169669, 30.033573 ], [ 121.166919, 30.034041 ], [ 121.162984, 30.034583 ], [ 121.159258, 30.035292 ], [ 121.157047, 30.035563 ], [ 121.155481, 30.035623 ], [ 121.153444, 30.034689 ], [ 121.152086, 30.033694 ], [ 121.150502, 30.033438 ], [ 121.150502, 30.034026 ], [ 121.152086, 30.034523 ] ] ] } }, { "type": "Feature", "properties": { "name": "区域面02" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 121.143656, 30.042152 ], [ 121.147143, 30.044714 ], [ 121.147717, 30.045469 ], [ 121.150355, 30.045508 ], [ 121.15304, 30.045627 ], [ 121.154531, 30.045965 ], [ 121.155976, 30.04674 ], [ 121.156573, 30.046978 ], [ 121.156504, 30.049043 ], [ 121.156848, 30.050274 ], [ 121.156917, 30.051208 ], [ 121.155907, 30.051245 ], [ 121.155724, 30.051921 ], [ 121.154554, 30.05202 ], [ 121.153475, 30.052119 ], [ 121.153131, 30.052735 ], [ 121.152994, 30.053648 ], [ 121.152282, 30.053748 ], [ 121.150941, 30.053238 ], [ 121.149208, 30.052423 ], [ 121.147854, 30.051837 ], [ 121.147359, 30.051509 ], [ 121.147095, 30.05038 ], [ 121.147392, 30.049108 ], [ 121.147557, 30.048051 ], [ 121.147111, 30.04675 ], [ 121.147227, 30.04635 ], [ 121.146286, 30.046107 ], [ 121.145312, 30.045779 ], [ 121.144586, 30.045593 ], [ 121.143975, 30.045336 ], [ 121.143645, 30.045621 ], [ 121.142753, 30.045193 ], [ 121.141994, 30.044978 ], [ 121.141449, 30.044664 ], [ 121.141713, 30.043864 ], [ 121.142737, 30.042835 ], [ 121.143656, 30.042152 ] ] ] } }, { "type": "Feature", "properties": { "name": "区域面03" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 121.108731, 30.043824 ], [ 121.110689, 30.042924 ], [ 121.113371, 30.042652 ], [ 121.115522, 30.042506 ], [ 121.117576, 30.041836 ], [ 121.119944, 30.042276 ], [ 121.121539, 30.042568 ], [ 121.12195, 30.042527 ], [ 121.121974, 30.041606 ], [ 121.12079, 30.041857 ], [ 121.119195, 30.041564 ], [ 121.117963, 30.041188 ], [ 121.1167, 30.041374 ], [ 121.115164, 30.041746 ], [ 121.113982, 30.041946 ], [ 121.112569, 30.042079 ], [ 121.111294, 30.042026 ], [ 121.109927, 30.042424 ], [ 121.108913, 30.04301 ], [ 121.108329, 30.043275 ], [ 121.108731, 30.043824 ] ] ] } } ] }, "apis": { "source": { "description": "数据接口", "handler": "render", "fields": {} } }, "config": { "options": { "type": "menu", "children": { "baseConfig": { "name": "基础配置", "type": "menuChild", "mode": "single", "children": { "system": { "name": "坐标系", "type": "radio", "default": "GCJ02", "optionCol": 12, "options": [ { "label": "WGS84", "value": "WGS84" }, { "label": "GCJ02", "value": "GCJ02" } ] }, "showLevel": { "name": "可见级别", "type": "slider", "mode": "double", "default": [ 0, 20 ], "step": 0.1, "min": 0, "max": 20, "showCurrentRange": true }, "altitude": { "name": "抬升高度", "default": 0, "type": "number" }, "depthTest": { "name": "自动排序", "type": "switch", "default": true }, "renderOrder": { "name": "层级序号", "type": "number", "default": 0, "show": [ [ "depthTest", "$eq", false ] ] } } }, "styleConfig": { "name": "样式配置", "type": "menuChild", "mode": "single", "children": { "bloom": { "name": "辉光", "type": "switch", "default": false, "statusText": true, "description": "主体组件开启辉光时才有效" }, "url": { "name": "数据", "type": "json", "default": "", "description": "数据格式为geojson,类型为面/区域(组件优先使用数据面板中配置的数据,未配置数据面板中的数据时使用此处数据,数据量大的时候不要使用配置面板的数据。" }, "fill": { "name": "填充颜色", "type": "color", "default": "rgba(28,223,253,0.5)" }, "border": { "name": "描边", "type": "group", "fold": false, "enableHide": true, "children": { "show": { "default": true }, "color": { "name": "颜色", "type": "color", "default": "#fff" }, "width": { "name": "粗细", "type": "number", "default": 2 } } }, "text": { "name": "区域文字", "type": "group", "fold": false, "enableHide": true, "children": { "show": { "default": true }, "key": { "name": "字段", "type": "text", "default": "name", "description": "geojson内properties中用于体现区域文字的字段" }, "textStyle": { "type": "font", "name": "文本样式", "default": { "fontFamily": "微软雅黑", "fontSize": 4, "color": "#eee", "fontWeight": "bold", "italic": "normal", "letterSpacing": 0 } }, "sizeType": { "name": "尺寸模式", "type": "radio", "default": "world", "description": "世界尺寸随镜头层级改变,屏幕尺寸不随镜头层级改变", "optionCol": 12, "options": [ { "label": "世界尺寸", "value": "world" }, { "label": "屏幕尺寸", "value": "screen" } ] }, "offset": { "name": "偏移", "type": "suite", "children": { "x": { "name": "X", "default": 0, "type": "number", "col": 12 }, "y": { "name": "Y", "default": -5, "type": "number", "col": 12 } } } } } } } } } } } }