Skip to content

Commit 8336bfd

Browse files
authored
fix: map bound (#86)
1 parent a4cd9be commit 8336bfd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/purple-wolves-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@antv/gpt-vis': patch
3+
---
4+
5+
fix: map bound

src/utils/map/view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const setMapView = (props: Map, scene: Scene) => {
3737
};
3838

3939
export const fitBounds = (props: Map, scene: Scene) => {
40-
if (props.includePoints) {
40+
if (props.includePoints?.length) {
4141
fitIncludePoints(props.includePoints, scene, props.includePadding);
4242
} else {
4343
const points: { longitude: number; latitude: number }[] = [];

0 commit comments

Comments
 (0)