-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Mapbox/Maplibre 20 层级以上数据偏移问题 (#2416)
* wip: data shake case * fix: fix line data offset in mapbox * refactor: 完成点线面图层属性索引重构 * refactor: 完成 citybuliding\earth\geometry\heatmap 图层属性索引重构 * refactor: 完成 image/ raster/wind 图层属性索引重构 * refactor: 标记最大索引 * chore: remove log * fix: line layer data shake * wip: point shape * wip: line simpleline * wip: pont billboard * wip: point shape * wip: wall shape * wip: raster layer * wip: polygon * test: update case * wip: extrude shape * refactor: 自定义开启双精度属性 * chore: fetch time * chore(CI): update snapshots (#2428) * chore: turn up fetch time * chore(CI): update snapshots (#2429) * chore: add changeset --------- Co-authored-by: lvisei <[email protected]>
- Loading branch information
Showing
141 changed files
with
2,117 additions
and
1,241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@antv/l7-layers': patch | ||
'@antv/l7-core': patch | ||
'@antv/l7-maps': patch | ||
--- | ||
|
||
fix: Mapbox/Maplibre 20 层级以上数据偏移问题 | ||
fix: 修复点图层部分 shape 中心点计算有误 | ||
fix: 修复立体面图层光照计算有误 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { MapRender as fujian } from './fujian'; | ||
export { MapRender as variFlight } from './vari-flight'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { LineLayer, Scene } from '@antv/l7'; | ||
import * as allMap from '@antv/l7-maps'; | ||
import type { RenderDemoOptions } from '../../types'; | ||
|
||
export function MapRender(options: RenderDemoOptions) { | ||
const scene = new Scene({ | ||
id: 'map', | ||
renderer: options.renderer, | ||
map: new allMap[options.map]({ | ||
style: 'dark', | ||
center: [104.34278, 41.12554], | ||
zoom: 2.94888, | ||
pitch: 0, | ||
}), | ||
}); | ||
|
||
scene.on('loaded', () => { | ||
fetch('https://gw.alipayobjects.com/os/bmw-prod/e495c407-953b-44cc-8f77-87b9cf257578.json') | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
const layer = new LineLayer({}) | ||
.source(data, { | ||
parser: { | ||
type: 'json', | ||
x: 'from_lon', | ||
y: 'from_lat', | ||
x1: 'to_lon', | ||
y1: 'to_lat', | ||
}, | ||
}) | ||
.size(2) | ||
.shape('arc3d') | ||
.color('#FF7C6A') | ||
.style({ | ||
segmentNumber: 15, | ||
opacity: 0.8, | ||
}); | ||
scene.addLayer(layer); | ||
if (window['screenshot']) { | ||
window['screenshot'](); | ||
} | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { LineLayer, Scene } from '@antv/l7'; | ||
import * as allMap from '@antv/l7-maps'; | ||
import type { RenderDemoOptions } from '../../types'; | ||
|
||
export function MapRender(options: RenderDemoOptions) { | ||
const scene = new Scene({ | ||
id: 'map', | ||
renderer: options.renderer, | ||
map: new allMap[options.map]({ | ||
style: 'light', | ||
center: [107.77791556935472, 35.443286920228644], | ||
zoom: 2.9142882493605033, | ||
}), | ||
}); | ||
|
||
scene.on('loaded', () => { | ||
fetch('https://gw.alipayobjects.com/os/rmsportal/UEXQMifxtkQlYfChpPwT.txt') | ||
.then((res) => res.text()) | ||
.then((data) => { | ||
const layer = new LineLayer({ | ||
blend: 'normal', | ||
}) | ||
.source(data, { | ||
parser: { | ||
type: 'csv', | ||
x: 'lng1', | ||
y: 'lat1', | ||
x1: 'lng2', | ||
y1: 'lat2', | ||
}, | ||
}) | ||
.size(1) | ||
.shape('greatcircle') | ||
// .animate({ | ||
// enable: true, | ||
// interval: 0.1, | ||
// trailLength: 0.5, | ||
// duration: 2, | ||
// }) | ||
.color('#8C1EB2') | ||
.style({ | ||
opacity: 0.8, | ||
}); | ||
scene.addLayer(layer); | ||
}); | ||
}); | ||
|
||
if (window['screenshot']) { | ||
window['screenshot'](); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export { MapRender as arc } from './arc'; | ||
export { MapRender as arc_plane } from './arc_plane'; | ||
export { MapRender as arc3D } from './arc-3d'; | ||
export { MapRender as dash } from './dash'; | ||
export { MapRender as flow } from './flow'; | ||
export { MapRender as greatcircle } from './greatcircle'; | ||
export { MapRender as normal } from './normal'; | ||
export { MapRender as simple } from './simple'; | ||
export { MapRender as wall } from './wall'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { LineLayer, Scene, Source } from '@antv/l7'; | ||
import * as allMap from '@antv/l7-maps'; | ||
import type { RenderDemoOptions } from '../../types'; | ||
|
||
export function MapRender(options: RenderDemoOptions) { | ||
const scene = new Scene({ | ||
id: 'map', | ||
renderer: options.renderer, | ||
map: new allMap[options.map]({ | ||
style: 'light', | ||
center: [121.434765, 31.256735], | ||
zoom: 14.83, | ||
}), | ||
}); | ||
const geoData = { | ||
type: 'FeatureCollection', | ||
features: [ | ||
{ | ||
type: 'Feature', | ||
properties: { | ||
offset: 0.3, | ||
}, | ||
geometry: { | ||
type: 'MultiLineString', | ||
coordinates: [ | ||
[ | ||
[99.228515625, 37.43997405227057], | ||
[100.72265625, 27.994401411046148], | ||
[110, 27.994401411046148], | ||
[110, 25], | ||
[100, 25], | ||
], | ||
[ | ||
[108.544921875, 37.71859032558816], | ||
[112.412109375, 32.84267363195431], | ||
[115, 32.84267363195431], | ||
[115, 35], | ||
], | ||
], | ||
}, | ||
}, | ||
{ | ||
type: 'Feature', | ||
properties: { | ||
offset: 0.8, | ||
}, | ||
geometry: { | ||
type: 'MultiLineString', | ||
coordinates: [ | ||
[ | ||
[110, 30], | ||
[120, 30], | ||
[120, 40], | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
}; | ||
const source = new Source(geoData); | ||
const layer = new LineLayer({ autoFit: true }) | ||
.source(source) | ||
.size(1) | ||
.shape('simple') | ||
.color('#f00'); | ||
|
||
scene.on('loaded', () => { | ||
scene.addLayer(layer); | ||
if (window['screenshot']) { | ||
window['screenshot'](); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.