geojson-map-fit-mercator
Version:
Finds the optimal bearing, zoom and center point for fitting a set of GeoJSON features in a Mapbox GL or LibreMap Mercator map.
10 lines • 540 B
TypeScript
import * as turf from '@turf/turf';
import type { Polygon, Feature, FeatureCollection } from 'geojson';
import { XY, mapFitOptions, mapFitResult, boundingOrientation } from './types';
declare function mapFitFeatures(features: FeatureCollection, screenDimensions: XY, options?: mapFitOptions): mapFitResult;
export declare function minimumBoundingRectangle(geoJsonInput: turf.AllGeoJSON): {
boundsOrientation: boundingOrientation;
boundingRectangle: Feature<Polygon>;
};
export { mapFitFeatures };
//# sourceMappingURL=index.d.ts.map