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 • 548 B
TypeScript
import type { Polygon, Feature, FeatureCollection } from 'geojson';
import { XY, mapFitOptions, mapFitResult, boundingOrientation } from './types';
import type { AllGeoJSON } from '@turf/helpers';
declare function mapFitFeatures(features: FeatureCollection, screenDimensions: XY, options?: mapFitOptions): mapFitResult;
export declare function minimumBoundingRectangle(geoJsonInput: AllGeoJSON): {
boundsOrientation: boundingOrientation;
boundingRectangle: Feature<Polygon>;
};
export { mapFitFeatures };
//# sourceMappingURL=index.d.ts.map