{"id":15284688,"url":"https://github.com/markuskooche/geocode","last_synced_at":"2025-04-12T23:44:21.569Z","repository":{"id":57677841,"uuid":"489494613","full_name":"markuskooche/Geocode","owner":"markuskooche","description":"A simple wrapper for (reverse) geocoding","archived":false,"fork":false,"pushed_at":"2023-05-03T14:03:41.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T23:44:06.182Z","etag":null,"topics":["geocode","googlemaps","laravel","openstreetmap","package","php","reverse"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/markuskooche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-06T21:10:06.000Z","updated_at":"2023-03-10T12:12:30.000Z","dependencies_parsed_at":"2022-08-31T06:50:50.044Z","dependency_job_id":null,"html_url":"https://github.com/markuskooche/Geocode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FGeocode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FGeocode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FGeocode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuskooche%2FGeocode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markuskooche","download_url":"https://codeload.github.com/markuskooche/Geocode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"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":["geocode","googlemaps","laravel","openstreetmap","package","php","reverse"],"created_at":"2024-09-30T14:59:27.092Z","updated_at":"2025-04-12T23:44:21.544Z","avatar_url":"https://github.com/markuskooche.png","language":"PHP","readme":"# Geocode - A simple wrapper for (reverse) geocoding\n\n## Installation\n```\ncomposer require markuskooche/geocode\n```\n\n## Usage\n### How to geocode\n``` php\nuse Illuminate\\Support\\Collection;\nuse Markuskooche\\Geocode\\Geocode;\n\n// Get the longitude and latitude of a location.\n$street = 'Pennsylvania Avenue Northwest';\n$number = '1917';\n$city = 'Washington';\n$zip = '20500';\n      \n// You only need api key for the google maps driver.\n// The standard driver will use the openstreet maps api.  \n$geocode = new Geocode(\u003cdriver_instance\u003e);\n$coordinates = $geocode-\u003ecoordinates($street, $number, $city, $zip);\n```\n``` php\n/**\n * The coordinates is returned as a collection.\n * @var Collection $coordinates\n */\n$coordinates = [\n    'longitude' =\u003e '-77.037852'\n    'latitude'  =\u003e '38.898556',\n];\n```\n\n### How to reverse geocode\n``` php\nuse Illuminate\\Support\\Collection;\nuse Markuskooche\\Geocode\\Geocode;\n\n// Get the street, number, city and zip of a location.\n$longitude = -77.0442641;\n$latitude = 38.9004915;\n\n// You only need api key for the google maps driver.\n// The standard driver will use the openstreet maps api.\n$geocode = new Geocode(\u003cdriver_instance\u003e);\n$address = $geocode-\u003eaddress($longitude, $latitude);\n```\n``` php\n/**\n * The address is returned as a collection.\n * @var Collection $address\n */\n$address = [\n    'street' =\u003e 'Pennsylvania Avenue Northwest',\n    'number' =\u003e '1917',\n    'city'   =\u003e 'Washington',\n    'zip'    =\u003e '20500',\n];\n```\n\n### Export the configuration\n``` php\nphp artisan vendor:publish --provider=\"Markuskooche\\Geocode\\GeocodeServiceProvider\" --tag=\"config\"\n```\n\n\n## Licence\nGeocode is an open-sourced software licensed under the [MIT license](LICENSE.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuskooche%2Fgeocode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkuskooche%2Fgeocode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuskooche%2Fgeocode/lists"}