UNPKG

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.

89 lines (88 loc) 2.59 kB
{ "name": "geojson-map-fit-mercator", "version": "1.0.1", "description": "Finds the optimal bearing, zoom and center point for fitting a set of GeoJSON features in a Mapbox GL or LibreMap Mercator map.", "main": "dist/index.cjs", "types": "types/index.d.ts", "module": "dist/index.mjs", "files": [ "dist/", "types/" ], "exports": { ".": [ { "types": "./types/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.cjs" }, "./dist/index.cjs" ] }, "scripts": { "test": "jest", "lint:types": "tsc --project ./tsconfig.json --noEmit", "lint:ts": "eslint src", "lint": "npm run lint:types && npm run lint:ts", "build": "rollup --config ./rollup.config.mjs", "docs:js": "cd docs && rollup --config ./rollup.config.mjs", "docs:jekyll": "cd docs && bundle exec jekyll build", "docs:typedoc": "typedoc --out docs src", "docs:local": "npm run docs:js && cd docs && bundle exec jekyll serve", "docs": "npm run docs:js && npm run docs:typedoc && npm run docs:jekyll", "prepare": "npm run build" }, "devDependencies": { "@eslint/js": "^9.10.0", "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-terser": "^0.4.4", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.13", "eslint": "^9.10.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "jest": "^29.7.0", "maplibre-gl": "^5.2.0", "prettier": "^3.3.3", "rollup": "^4.22.0", "rollup-plugin-import-css": "^3.5.8", "rollup-plugin-typescript2": "^0.36.0", "ts-jest": "^29.2.5", "ts-jest-resolver": "^2.0.1", "ts-node": "^10.9.2", "typedoc": "^0.27.9", "typedoc-plugin-markdown": "^4.2.7", "typescript": "~5.5.4", "typescript-eslint": "^8.6.0" }, "repository": { "type": "git", "url": "git+https://github.com/tjdavey/geojson-map-fit-mercator.git" }, "keywords": [ "Mapbox", "MapLibre", "GL", "Mercator", "Bounding", "Box", "Screen", "Fit", "Fit-to-screen", "bbox" ], "author": "Tristan Davey <tristan@tristandavey.com>", "license": "MIT", "bugs": { "url": "https://github.com/tjdavey/geojson-map-fit-mercator/issues" }, "homepage": "https://tristandavey.com/geojson-map-fit-mercator", "dependencies": { "@mapbox/sphericalmercator": "^2.0.1", "@turf/turf": "^7.2.0", "geojson": "^0.5.0" } }