We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a26bd6d commit cf765b0Copy full SHA for cf765b0
docs/src/main.ts
@@ -1,6 +1,6 @@
1
import { Map } from 'maplibre-gl';
2
import { mapFitFeatures } from '../../src/index';
3
-import * as turf from '@turf/turf';
+import bbox from '@turf/bbox';
4
import type { GeoJSON } from 'geojson';
5
import type { LngLatBoundsLike } from 'maplibre-gl';
6
@@ -46,7 +46,7 @@ function setupMapMainPreview() {
46
document.getElementById('map-main-preview-fit-bbox').addEventListener('change', function() {
47
const radioButton = this as HTMLInputElement;
48
49
- const boundingBox = turf.bbox(sampleData as GeoJSON.FeatureCollection);
+ const boundingBox = bbox(sampleData as GeoJSON.FeatureCollection);
50
51
if (radioButton.checked) {
52
previewMap.fitBounds(boundingBox as LngLatBoundsLike, {padding});
0 commit comments