静态图 map-image
2026年7月20日大约 2 分钟
静态图 map-image
四角坐标贴一张静态影像。
放在
map-2d的pieces里;enabled写在节点顶层。数据来源data-input:bind-fields(绑工程连接)或source(引用数据源)。
在线演示
一张互联网静态图(稳定演示图床)按「四角坐标」贴到高德底图上(左上;右上;右下;左下),配不透明度 + 饱和度 / 对比度影像调节。联网即可出图;可拖拽缩放对比贴合关系。
属性
| 属性 | 名称 | 类型 | 默认 | 说明 |
|---|---|---|---|---|
image-url | 图片地址 | image-src | — | |
image-coordinates | 地理角点 | map-image-bounds | -20,10;20,-10 | |
image-opacity | 不透明度 | slider(min=0,max=100,step=1,unit=%) | 100 | |
image-saturation | 饱和度 | slider(min=-100,max=100,step=1,unit=%) | 0 | |
image-hue | 色相旋转 | slider(min=0,max=360,step=1,unit=°) | 0 | |
image-brightness | 亮度 | slider(min=-100,max=100,step=1,unit=%) | 0 | |
image-contrast | 对比度 | slider(min=-100,max=100,step=1,unit=%) | 0 | |
image-resampling | 采样方式 | select | linear | 可选:linear / nearest |
row-row-filter-mode-id | 选择数据规则 | select(condition) | — |
事件
| 触发器 | 名称 | 配在哪 | payload |
|---|---|---|---|
marker-click | 点击点要素 | map-2d 组件的 options.interactions(运行态按命中图层分流) | 命中要素属性行,公式 {:name} / {:value} 取值 |
region-click | 点击面要素 | 同上 | 同上 |
map-select / map-unselect | 选中 / 取消 | 同上 | 选中项数据 |
事件写在地图组件上而非图层上。图层还支持
feature-panel-uid(点击要素弹锚定窗口)与tooltip-enable(悬停浮层),见属性表。动作端可用mapLayerVisible/mapSetLayerStyle/mapRefreshData等 17 个地图动作,见 2D 地图 · 事件。
示例
{
"type": "map-image",
"uid": "ly_x",
"enabled": true,
"options": {
"image-url": "https://…/overlay.png",
"image-coordinates": "116.30,39.99;116.50,39.99;116.50,39.85;116.30,39.85"
}
}