Skip to content

Commit cf765b0

Browse files
committed
Patch documentation to utilise new @Turf dependency structure
1 parent a26bd6d commit cf765b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Map } from 'maplibre-gl';
22
import { mapFitFeatures } from '../../src/index';
3-
import * as turf from '@turf/turf';
3+
import bbox from '@turf/bbox';
44
import type { GeoJSON } from 'geojson';
55
import type { LngLatBoundsLike } from 'maplibre-gl';
66

@@ -46,7 +46,7 @@ function setupMapMainPreview() {
4646
document.getElementById('map-main-preview-fit-bbox').addEventListener('change', function() {
4747
const radioButton = this as HTMLInputElement;
4848

49-
const boundingBox = turf.bbox(sampleData as GeoJSON.FeatureCollection);
49+
const boundingBox = bbox(sampleData as GeoJSON.FeatureCollection);
5050

5151
if (radioButton.checked) {
5252
previewMap.fitBounds(boundingBox as LngLatBoundsLike, {padding});

0 commit comments

Comments
 (0)