antvis / l7plot Goto Github PK
View Code? Open in Web Editor NEW🌍 Geospatial Visualization Chart Library
Home Page: https://l7plot.antv.antgroup.com
License: MIT License
🌍 Geospatial Visualization Chart Library
Home Page: https://l7plot.antv.antgroup.com
License: MIT License
如题,用的是L7Plot的高级图表
部分代码如下:
container是地图的chart实例
地图的map属性:
尝试设置preserveDrawingBuffer: true来解决问题未果
不太确定是不是html2canvas本身的问题,来寻求官方的帮助
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
下载地图png每次都能成功
1、例如label原本是广州市,但需求要数据结合,如广州市(999)。
2、甚至能支持组件形式,可以自己封装改样式
This package, which is a dependency of @ant-design/charts, breaks Vite building with following error:
$ vite build
vite v2.6.14 building for production...
✓ 35 modules transformed.
[vite:resolve] Failed to resolve entry for package "@antv/l7plot". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "@antv/l7plot". The package may have incorrect main/module/exports specified in its package.json.
error during build:
Error: Failed to resolve entry for package "@antv/l7plot". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "@antv/l7plot". The package may have incorrect main/module/exports specified in its package.json.
at packageEntryFailure (/Volumes/Projects/workspace/sample/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:30273:11)
at resolvePackageEntry (/Volumes/Projects/workspace/sample/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:30269:9)
at tryNodeResolve (/Volumes/Projects/workspace/sample/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:30044:11)
at Object.resolveId (/Volumes/Projects/workspace/sample/node_modules/vite/dist/node/chunks/dep-e0fe87f8.js:29910:28)
at /Volumes/Projects/workspace/sample/node_modules/rollup/dist/shared/rollup.js:22706:25
error Command failed with exit code 1.
yarn
yarn build
Built without error.
package.json
of this package from unpkg, which declares an invalid 'module' that does not exist:
limitInPlot属性无法屏蔽一些后出现的状态
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
limitInPlot: true 设置了屏蔽图表外的显示但是折线图的active还是会显示
坐标轴以外的不显示
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
行政区域图地理数据需要默认线上载入数据,官网默认配置如下:
geoArea: {
url: 'https://gw.alipayobjects.com/os/alisis/geo-data-v0.1.2/choropleth-data',
type: 'topojson',
},
我已经通过下载地图依赖json文件,本地建了相似的choropleth-data文件夹,此时将geoArea配置中的URL改为本地/项目的choropleth-data文件夹地址,都失效。
请问,行政图功能如何载入依赖的json文件夹?
希望实现 label 压在飞线**的效果,类似下图:
尝试了 textAnchor 和 textOffset 属性不行,现在这个 label 的锚点是基于起点是吗?有办法基于起点和终点之间弧线的中点么?
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div id="container" class="grid grid-rows-6 grid-cols-4 gap-6" style="padding: 80px"></div>
<script>
const list = [
// 点
'https://gw.alipayobjects.com/zos/antfincdn/JVdKQHfpZC/d3287038-6329-4bdd-8471-c830d5daf52f.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/VbC9OPwdNg/8bf7bd3f-2479-4228-b04b-4cb38af1d7af.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/gozHK9LNFl/d37bc490-722b-4b73-a627-3c261b0401d2.png',
'https://gw.alipayobjects.com/zos/antfincdn/dTdD4KQGvH/06e323e4-92ce-40d9-a58f-837adbce5f26.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/kDRYz0hAqk/88b8ee59-de23-4c49-becb-a80354adaaee.png',
'https://gw.alipayobjects.com/zos/antfincdn/u31zxgii2R/d3fe9e5f-feb6-4b32-8237-4d79ae99a906.png',
'https://gw.alipayobjects.com/zos/antfincdn/cfT2Jb1Fi2/83261ea9-3ccc-4684-a47a-721343c0279b.png',
'https://gw.alipayobjects.com/zos/antfincdn/t5BQDH5Jp8/dbcddc7e-5ff9-4d3b-af9b-2d86f40b626a.png',
// 网格
'https://gw.alipayobjects.com/zos/antfincdn/fKPFt8cFk4/a091a42a-2411-4011-9dc7-ef7d39197f8d.png',
'https://gw.alipayobjects.com/zos/antfincdn/7W1VDrMpy%24/63f536b0-244a-41e9-9698-c3249a2108a7.png',
// 热力
'https://gw.alipayobjects.com/zos/antfincdn/svqQmzIKVw/2977de7d-6362-42f1-b731-05e734b6bfe0.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/qgKi3OxQVE/4553729d-c2ce-490b-aebb-ea948bef7f2e.png',
'https://gw.alipayobjects.com/zos/antfincdn/5osUdJv%24Nq/51c6693d-e00a-4c32-adb2-90b95359d4f2.png',
// 线
'https://gw.alipayobjects.com/zos/antfincdn/0BBZcXixuK/ec49b3ab-4f47-42ef-907c-9912a9c3e4ea.png',
'https://gw.alipayobjects.com/zos/antfincdn/EQVpMcc11v/ab32657b-2410-4770-99ee-f73f62a4848b.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/y9%26C49CVvy/72b49289-9325-4836-816e-99560385d698.png',
// 流向
'https://gw.alipayobjects.com/zos/antfincdn/%26fdYw4HPc2/dcc23314-d910-4887-998a-ed5470bbb7d0.png',
// 'https://gw.alipayobjects.com/zos/antfincdn/CHihJw0kuI/c4144d36-fd67-4138-950a-28ffe2f3c2ef.png',
'https://gw.alipayobjects.com/zos/antfincdn/5%266ER7Qzw%26/6510f8b9-6384-4b43-8fae-b473b2f18b15.png',
// 面
'https://gw.alipayobjects.com/zos/antfincdn/FxfaZh3ji5/15fef873-a1e8-4ddc-b6a2-320dd9d059da.png',
'https://gw.alipayobjects.com/zos/antfincdn/TNRpqWoYoC/91d7085a-72eb-49fb-b5eb-e1a40c20672a.png',
// 区域
'https://gw.alipayobjects.com/zos/antfincdn/n5MwQP7qEE/9482d87d-c1e5-4b3a-ab31-46e9959e881b.png',
];
const container = document.querySelector('#container');
const imgs = list
.map((item) => {
return `<div class="h-48 shadow-2xl bg-white rounded-lg bg-cover bg-center bg-no-repea" style="background-image: url(${item})"></div>`;
})
.join('');
container.innerHTML = imgs;
</script>
</body>
</html>
如何在世界行政地图中添加各个国家渲染的数据?应该是需要一个code,但是没有提供code-国家对照表
https://codesandbox.io/s/magical-chihiro-xvf3y?file=/index.ts
国内的数据格式是{name:"xxx",code:xxx,value:xxx},可以正常渲染
正常展示数据
石油行业的地理剖面图使用哪种antv工具库?
类似https://www.int.com/geotoolkit-demos/deviated-schematics/图例的偏差示意图,antv有没有替代工具?
我的原型图如下:
在antv的示例中似乎找不到合适的解决方案?
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
L7Plot/packages/l7plot/src/core/map/index.ts
Line 120 in 8653d09
DotLayer 在绘制 icon 的时候,必须要将 color 赋值 #fff 才会生效
项目引用 https://unpkg.com/@antv/l7plot@latest/dist/umd/l7plot.min.js
运行在 IE 11 上,报错了 “Symbol”未定义,IE11 不支持该 ES6 语法
需要做什么改动 L7Plot 才能支持啊,能提供一个编译到兼容 IE11 的版本么
高级图表中的多图表 type 不支持配置 flow
图表组配置,图表类型支持 L7Plot 内置的图表。
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
今天 AntV 地理可视分析也新增了一位成员 L7Plot - 地理可视化图表库。
L7Plot 是简单易用、图表丰富、支持定制的地理空间数据可视化地理图表库。
图表
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
l7plot 官网文档的例子
https://antv-l7plot.gitee.io/zh/examples/dot/bobble#earthquake-level
鼠标靠近气泡点附近,会出现空白的 tooltip 框
显示正常的 tooltip 框
import { L7Plot } from "@antv/l7plot";
fetch(
`https://gw.alipayobjects.com/os/alisis/geo-data-v0.1.2/administrative-data/area-list.json`
)
.then((response) => response.json())
.then((list) => {
const data = list
.filter(({ level }) => level === "province")
.map((item) => Object.assign({}, item, { value: Math.random() * 5000 }));
new L7Plot("container", {
map: {
type: "mapbox",
style: "blank",
center: [120.19382669582967, 30.258134],
zoom: 3,
pitch: 0
},
plots: [
{
type: "flow",
zIndex: 100,
source: {
data: [
{
x: 116.407387,
x1: 113.266887,
y: 39.904179,
y1: 23.133306
},
{
x: 116.407387,
x1: 112.578781,
y: 39.904179,
y1: 37.813948
},
{
x: 116.407387,
x1: 87.628579,
y: 39.904179,
y1: 43.793301
}
],
parser: {
type: "json",
x: "x",
y: "y",
x1: "x1",
y1: "y1"
}
},
shape: "arc3d",
size: [2, 5],
color: "red",
style: {
opacity: 1
},
state: {
active: { stroke: "black", lineWidth: 1 }
},
animate: {
interval: 2,
trailLength: 2,
duration: 1
},
radiation: {
color: "#333",
size: 30,
style: {
opacity: 1
}
},
active: true
},
{
type: "choropleth",
zIndex: 1,
source: {
data: [],
joinBy: {
sourceField: "code",
geoField: "adcode"
}
},
viewLevel: {
level: "country",
adcode: "100000"
},
autoFit: true,
color: "#fff",
style: {
opacity: 1,
stroke: "#F2F7F7",
lineWidth: 0.6,
lineOpacity: 0.8
},
label: {
visible: true,
field: "name",
style: {
fill: "#000",
opacity: 0.8,
fontSize: 10,
stroke: "#f0f0f0",
strokeWidth: 2,
textAllowOverlap: false,
padding: [5, 5],
textOffset: [0, 40]
}
}
}
],
layers: [],
zoom: {
position: "bottomright"
}
});
});
有这样一个场景,外面有个地区列表,在列表中选中广州,地图就自动选中到广州
还有请问有相关沟通群吗,我问题挺多的🤔
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
在行政区域图Choropleth中,在设置了state.select下,能否手动设置城市让地图中相应的位置设置选中状态,操作流程是,前端界面上有一个下拉框,当选择某一城市时,地图上相应的城市区域会显示选中状态。
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
我有个动作是从**地图触发changeView({ level: 'world', adcode: 'all'}),变成世界地图,有api改变center吗,希望可以比较聚焦到**
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
官方文档中的示例是有设置选项
legend: {
position: 'bottomleft',
},
但是图例不显示
L7Plot地图没法设置禁止拖拽,最大和最小zoom,这个要怎么解决?
https://riddle.alibaba-inc.com/riddles/28772da3
Please provide a link by forking these links L7Plot or GitHub repo, a minimal reproduction.
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
希望viewLevel的level从world切换到country
怎么获取缩放下四个角的经纬度
Choropleth 区域行政图,对于textLayer,如label。当有切换字体的需求时,字体切换失败。同样的方法对字体大小是生效的。
希望能够实现字体切换
能够实现字体切换
您正在使用 Demo测试地图token,如果生产环境中使用去对应地图请注册Token
上哪里注册token呀
最基础无任何额外数据的钻取地图,在从Province层上卷到Country层的时候,会卡顿2秒左右,而且会失去动画,官网例子也存在同样的问题,而下钻却完全没问题。
官网例子:https://l7plot.antv.vision/zh/examples/choropleth/drill#order-drill
ps:L7也没这个问题,L7Plot却有
https://l7plot.antv.vision/zh/examples/advanced-plot/muti-plots#china-bubble
Please provide a link by forking these links L7Plot or GitHub repo. What is a minimal reproduction, and why is it required?
通过点击区域或点获取到当前的数据
多选不符合常用交互,多选一般和单选并存的,多选交互需要点击 shift + 选中。目前是点击直接触发多选
用官网的例子多次修改配置信息会出现警告Too many active WebGL contexts. Oldest context will be lost.
我自己的代码也同样的问题,已经在组件卸载的时候调用了destroy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.