{"id":23091631,"url":"https://github.com/josevte/nova-map-address","last_synced_at":"2025-04-03T18:19:54.812Z","repository":{"id":57001861,"uuid":"223213241","full_name":"JoseVte/nova-map-address","owner":"JoseVte","description":"Laravel Nova package to use Google Maps","archived":false,"fork":false,"pushed_at":"2020-04-17T15:08:33.000Z","size":214,"stargazers_count":3,"open_issues_count":3,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T06:41:18.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/JoseVte.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":"2019-11-21T16:09:30.000Z","updated_at":"2022-08-11T11:50:46.000Z","dependencies_parsed_at":"2022-08-21T12:10:30.598Z","dependency_job_id":null,"html_url":"https://github.com/JoseVte/nova-map-address","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseVte%2Fnova-map-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseVte%2Fnova-map-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseVte%2Fnova-map-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoseVte%2Fnova-map-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoseVte","download_url":"https://codeload.github.com/JoseVte/nova-map-address/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247052617,"owners_count":20875685,"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":[],"created_at":"2024-12-16T21:18:54.480Z","updated_at":"2025-04-03T18:19:54.783Z","avatar_url":"https://github.com/JoseVte.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Nova Map Address Field\n\nA Nova field to place a marker on map to get coordinates then it reverse geocoding the coordinates to get a street address\n\n## Installation\n\nYou can install the package in to a Laravel app that uses Nova via composer:\n\n```bash\ncomposer require josrom/nova-map-address\n```\n\n## Configuration\nPublish the package config file:\n```bash\nphp artisan vendor:publish --provider=\"Josrom\\MapAddress\\FieldServiceProvider\"\n```\n\nThis is the contents of the file which will be published at [config/map-address.php](config/map-address.php).\n\nAdd the following keys to your `.env` and `.env.example`:\n\n```\nMAP_ADDRESS_API_KEY=\n\nOptional: Set map and address language\nMAP_ADDRESS_LANGUAGE=es\n```\n\n_If you need a Google Maps API key, you can create an app and enable Places API and create credentials to get your API key https://console.developers.google.com._\n\n## Usage:\nAdd the below to Nova/{Model}.php resource:\n\n```php\n\nuse Josrom\\MapAddress\\MapAddress;\n\n[\n    MapAddress::make('address'),\n\n    // You can set the initial map location. By default (Spain)\n     MapAddress::make('address')\n        -\u003einitLocation(38.261842, -0.6868031),\n        \n    // You can set the location from the model\n    MapAddress::make('address')\n        -\u003esetLocation($this-\u003elatitude, $this-\u003elongitude),\n        \n    // You can select the name of lat/lng fields. By default is lat/lng\n    MapAddress::make('address')\n        -\u003esetLatitudeField('latitude')\n        -\u003esetLongitudeField('longitude'),\n    \n    // You can select what is the first result set in address field\n    MapAddress::make('address')\n        -\u003esetGoogleResultType('street_address'),\n    \n    // You can also set the map zoom level. By default (4)\n     MapAddress::make('address')\n        -\u003einitLocation(38.261842, -0.6868031)\n        -\u003ezoom(12),\n]\n```\n\n![Package screenshot](/doc/map.png)\n\n## Support:\n\n* Jose Vicente Orts: vince@square1.io\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosevte%2Fnova-map-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosevte%2Fnova-map-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosevte%2Fnova-map-address/lists"}