{"id":16461798,"url":"https://github.com/codewithdennis/filament-simple-map","last_synced_at":"2026-03-05T17:17:56.814Z","repository":{"id":246516085,"uuid":"821370211","full_name":"CodeWithDennis/filament-simple-map","owner":"CodeWithDennis","description":"This package offers a straightforward and easy-to-use map action component for your Filament application.","archived":false,"fork":false,"pushed_at":"2024-09-04T18:58:02.000Z","size":17500,"stargazers_count":32,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T00:11:26.882Z","etag":null,"topics":["filamentphp","filamentphp-plugin","google-maps","laravel","map","maps","plugin","plugins"],"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/CodeWithDennis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"CodeWithDennis"}},"created_at":"2024-06-28T11:43:32.000Z","updated_at":"2024-12-30T12:55:13.000Z","dependencies_parsed_at":"2024-06-28T12:30:03.091Z","dependency_job_id":"ba7f2e6d-7867-444e-b5cb-5df7e2fe4117","html_url":"https://github.com/CodeWithDennis/filament-simple-map","commit_stats":null,"previous_names":["codewithdennis/filament-simple-map"],"tags_count":4,"template":false,"template_full_name":"filamentphp/plugin-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-simple-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-simple-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-simple-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-simple-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeWithDennis","download_url":"https://codeload.github.com/CodeWithDennis/filament-simple-map/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241809613,"owners_count":20023786,"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":["filamentphp","filamentphp-plugin","google-maps","laravel","map","maps","plugin","plugins"],"created_at":"2024-10-11T11:09:23.871Z","updated_at":"2026-03-05T17:17:56.755Z","avatar_url":"https://github.com/CodeWithDennis.png","language":"PHP","readme":"# Filament Simple Map\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/codewithdennis/filament-simple-map.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/filament-simple-map)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/codewithdennis/filament-simple-map/pint.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/codewithdennis/filament-simple-map/actions?query=workflow%3A\"Fix+PHP+code+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/codewithdennis/filament-simple-map.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/filament-simple-map)\n\nThis package provides a **simple** and user-friendly map display action component for your Filament application. It utilizes an iframe to render the map, ensuring seamless integration. Ensure you have a [Google Maps API](https://developers.google.com/maps/documentation/javascript/get-api-key)\nkey to use this\npackage.\n\n![thumbnail.png](https://raw.githubusercontent.com/CodeWithDennis/filament-simple-map/main/resources/images/thumbnail.png)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require codewithdennis/filament-simple-map\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-simple-map-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'google_maps_embed_api_key' =\u003e env('GOOGLE_MAPS_EMBED_API_KEY'),\n];\n```\n\n## Usage\nThis package supports the following Google Maps modes `place`, `view`, `streetview`, `search` and `directions`. The default mode is `place`. You can use it for Table Actions, Infolists, Forms, and regular actions. Just make sure you import the right component.\n\n### Place\nMethods that are available with the default **place** mode.\n\nDefines map marker location.\n\n```php\n-\u003eaddress('City Hall, New York, NY')\n```\n\nDefines center of the map view.\n\n```php\n-\u003ecenter('37.4218,-122.0840')\n```\n\nSets initial zoom level of the map.\n\n```php\n-\u003ezoom(10) // 0 to 21\n```\n\nSets the map to satellite view. (default: roadmap)\n\n```php\n-\u003esatellite()\n```\n\nDefines the language to use for UI elements and for the display of labels on map tiles.\n\n```php\n-\u003elanguage('en')\n```\n\nDefines the appropriate borders and labels to display, based on geopolitical sensitivities.\n\n```php\n-\u003eregion('en')\n```\n\nHere is an example of how to use the **place** mode.\n\n```php\nForms\\Components\\TextInput::make('address')\n    -\u003erequired()\n    -\u003emaxLength(255)\n    -\u003esuffixAction(\n        SimpleMap::make('showMap')\n            -\u003eicon('heroicon-o-map')\n            -\u003eaddress('City Hall, New York, NY')\n            -\u003ecenter('37.4218,-122.0840')\n            -\u003ezoom(10)\n            -\u003esatellite()\n            -\u003elanguage('en')\n            -\u003eregion('US'),\n    ),\n```\n\n### View\n\nTo use the **view** mode, you need to call the `viewing` method.\n\nSets the map to viewing mode.\n\n```php\n-\u003eviewing()\n```\n\nDefines center of the map view.\n\n```php\n-\u003ecenter('-33.8569,151.2152')\n```\n\nSets initial zoom level of the map.\n\n```php\n-\u003ezoom(10) // 0 to 21\n```\n\nSets the map to satellite view. (default: roadmap)\n\n```php\n-\u003esatellite()\n```\n\nHere is an example of how to use the `view` mode.\n\n```php\nForms\\Components\\TextInput::make('address')\n    -\u003erequired()\n    -\u003emaxLength(255)\n    -\u003esuffixAction(\n        SimpleMap::make('showMap')\n            -\u003eviewing()\n            -\u003ecenter('-33.8569,151.2152')\n            -\u003ezoom(10)\n            -\u003esatellite()\n    ),\n```\n\n### Directions\n\nTo use the **directions** mode, you need to call the `directions` method.\n\nDefines the starting point for calculating directions.\n\n```php\n-\u003eorigin('Amsterdam, Netherlands')\n```\n\nDefines the destination point for calculating directions.\n\n```php\n-\u003edestination('Rotterdam, Netherlands')\n```\n\nSpecifies one or more intermediary places to route directions between the origin and destination.\n\n```php\n-\u003ewaypoints([\n    'Utrecht, Netherlands',\n    'Den Haag, Netherlands'\n])\n```\n\nSpecifies features to avoid in directions. Note that this doesn't preclude routes that include the restricted feature(s); it biases the result to more favorable routes.\n\n```php\n-\u003eavoid([\n    'tolls',\n    'highways',\n    'ferries'\n])\n```\n\nSets the mode of transport to flying.\n\n```php\n-\u003eflying()\n```\n\nSets the mode of transport to walking.\n\n```php\n-\u003ewalking()\n```\n\nSets the mode of transport to bicycling.\n\n```php\n-\u003ebicycling()\n```\n\nSets the mode of transport to transit.\n\n```php\n-\u003etransit()\n```\n\nSets the mode of transport to driving.\n\n```php\n-\u003edriving()\n```\n\nSets the unit system to imperial. (default: metric)\n\n```php\n-\u003eimperial()\n```\n\nDefines center of the map view.\n\n```php\n-\u003ecenter('52.3676,4.9041')\n```\n\nSets the map to satellite view. (default: roadmap)\n\n```php\n-\u003esatellite()\n```\n\nDefines the language to use for UI elements and for the display of labels on map tiles.\n\n```php\n-\u003elanguage('nl')\n```\n\nDefines the appropriate borders and labels to display, based on geopolitical sensitivities.\n\n```php\n-\u003eregion('nl')\n```\n\nHere is an example of how to use the **directions** mode.\n\n```php\nForms\\Components\\TextInput::make('address')\n    -\u003erequired()\n    -\u003emaxLength(255)\n    -\u003esuffixAction(\n        SimpleMap::make('showMap')\n            -\u003edirections()\n            -\u003eorigin('Amsterdam, Netherlands')\n            -\u003edestination('Rotterdam, Netherlands')\n            -\u003ewalking()\n            -\u003eimperial()\n            -\u003esatellite()\n            -\u003elanguage('nl')\n    ),\n```\n\n### Streetview\n\nTo use the **streetview** mode, you need to call the `streetview` method.\n\nDefines the location to display street view.\n\n```php\n-\u003elocation('52.3676,4.9041')\n```\n\nIndicates the compass heading of the camera in degrees clockwise from North.\n\n```php\n-\u003eheading(0) // -180 to 360\n```\n\nSpecifies the angle, up or down, of the camera.\n\n```php\n-\u003epitch(0) // -90 to 90\n```\n\nDetermines the horizontal field of view of the image.\n\n```php\n-\u003efov(100) // 10 to 100\n```\n\nDefines center of the map view.\n\n```php\n-\u003ecenter('52.3676,4.9041')\n```\n\nSets initial zoom level of the map.\n\n```php\n-\u003ezoom(10) // 0 to 21\n```\n\nDefines the language to use for UI elements and for the display of labels on map tiles.\n\n```php\n-\u003elanguage('nl')\n```\n\nDefines the appropriate borders and labels to display, based on geopolitical sensitivities.\n\n```php\n-\u003eregion('nl')\n```\n\n### Search\n\nTo use the **search** mode, you need to call the `search` method.\n\nDefines the search term.\n\n```php\n-\u003equery('restaurants near Amsterdam, Netherlands')\n```\n\nDefines center of the map view.\n\n```php\n-\u003ecenter('52.3676,4.9041')\n```\n\nSets initial zoom level of the map.\n\n```php\n-\u003ezoom(10) // 0 to 21\n```\n\nSets the map to satellite view. (default: roadmap)\n\n```php\n-\u003esatellite()\n```\n\nDefines the language to use for UI elements and for the display of labels on map tiles.\n\n```php\n-\u003elanguage('nl')\n```\n\nDefines the appropriate borders and labels to display, based on geopolitical sensitivities.\n\n```php\n-\u003eregion('nl')\n```\n\nHere is an example of how to use the **search** mode.\n\n```php\nForms\\Components\\TextInput::make('address')\n    -\u003erequired()\n    -\u003emaxLength(255)\n    -\u003esuffixAction(\n       SimpleMap::make()\n            -\u003esearch()\n            -\u003equery('restaurants near Amsterdam, Netherlands')\n            -\u003ecenter('52.3676,4.9041')\n            -\u003ezoom(10)\n    ),\n```\n\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Credits\n\n- [CodeWithDennis](https://github.com/CodeWithDennis)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":["https://github.com/sponsors/CodeWithDennis"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithdennis%2Ffilament-simple-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithdennis%2Ffilament-simple-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithdennis%2Ffilament-simple-map/lists"}