{"id":20779851,"url":"https://github.com/soroushchehresa/map-nearest-location","last_synced_at":"2025-10-08T09:37:31.675Z","repository":{"id":46191344,"uuid":"110131911","full_name":"soroushchehresa/map-nearest-location","owner":"soroushchehresa","description":"📍 Find the nearest location and get distance from locations list without network request","archived":false,"fork":false,"pushed_at":"2023-03-03T22:28:05.000Z","size":30,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T11:38:16.279Z","etag":null,"topics":["distance","google-maps","javascript-map","map","maps","npm-package","offline-maps"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soroushchehresa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-09T15:25:23.000Z","updated_at":"2024-05-30T08:51:33.000Z","dependencies_parsed_at":"2022-09-08T13:32:11.791Z","dependency_job_id":null,"html_url":"https://github.com/soroushchehresa/map-nearest-location","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soroushchehresa%2Fmap-nearest-location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soroushchehresa%2Fmap-nearest-location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soroushchehresa%2Fmap-nearest-location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soroushchehresa%2Fmap-nearest-location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soroushchehresa","download_url":"https://codeload.github.com/soroushchehresa/map-nearest-location/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251773511,"owners_count":21641646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distance","google-maps","javascript-map","map","maps","npm-package","offline-maps"],"created_at":"2024-11-17T13:30:06.494Z","updated_at":"2025-10-08T09:37:31.607Z","avatar_url":"https://github.com/soroushchehresa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# map-nearest-location [![NPM](https://img.shields.io/npm/v/map-nearest-location.svg)](https://www.npmjs.com/package/map-nearest-location)\n\nSimple library to find the nearest location and get distance from locations list without network request.\n\n## Install\n\n  `npm i -S map-nearest-location`\n\n  or\n\n  `yarn add map-nearest-location`\n\n## Usage\n\n```\n\n import findNearestLocation from 'map-nearest-location';\n\n const myLocation = {\n   lat: 40.7153043,\n   lng: -74.1037503\n };\n\n const locations = [\n   {\n     lat: 40.7722691,\n     lng: -74.3008176\n   },\n   {\n     lat: 40.682638,\n     lng: -73.941015\n   },\n   {\n     lat: 40.870347,\n     lng: -74.105810\n   },\n   {\n     lat: 40.7374197,\n     lng: -74.2719785\n   }\n ];\n\n const nearestLocation = findNearestLocation(myLocation, locations);\n\n```\n\n## Output\n\n```\n\n {\n   location: {\n      lat: 40.682638,\n      lng: -73.941015\n   },\n   distance: 14191.625245346084 // meter\n }\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoroushchehresa%2Fmap-nearest-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoroushchehresa%2Fmap-nearest-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoroushchehresa%2Fmap-nearest-location/lists"}