{"id":35226267,"url":"https://github.com/mastani/laravel-google-static-map","last_synced_at":"2026-04-19T10:02:23.023Z","repository":{"id":32726039,"uuid":"140757191","full_name":"mastani/laravel-google-static-map","owner":"mastani","description":"Laravel Google Static Map Generator","archived":false,"fork":false,"pushed_at":"2025-03-06T18:17:02.000Z","size":28,"stargazers_count":47,"open_issues_count":1,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-23T02:48:49.587Z","etag":null,"topics":["google-map","laravel"],"latest_commit_sha":null,"homepage":null,"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/mastani.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-12T19:38:43.000Z","updated_at":"2025-11-22T20:41:08.000Z","dependencies_parsed_at":"2024-06-19T01:52:37.101Z","dependency_job_id":"6857674d-88c0-40fd-a452-2191d980ccc9","html_url":"https://github.com/mastani/laravel-google-static-map","commit_stats":{"total_commits":24,"total_committers":10,"mean_commits":2.4,"dds":0.5,"last_synced_commit":"0118a337067b1c9ec07be69e0823c3c508b561b7"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mastani/laravel-google-static-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastani%2Flaravel-google-static-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastani%2Flaravel-google-static-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastani%2Flaravel-google-static-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastani%2Flaravel-google-static-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mastani","download_url":"https://codeload.github.com/mastani/laravel-google-static-map/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mastani%2Flaravel-google-static-map/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32002361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["google-map","laravel"],"created_at":"2025-12-30T01:11:23.851Z","updated_at":"2026-04-19T10:02:22.962Z","avatar_url":"https://github.com/mastani.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Static Map Generator\n\nGenerate static map using Google Map API in Laravel.\n\n[![Total Downloads](https://poser.pugx.org/mastani/laravel-google-static-map/downloads)](https://packagist.org/packages/mastani/laravel-google-static-map)\n[![Latest Stable Version](https://poser.pugx.org/mastani/laravel-google-static-map/v/stable)](https://packagist.org/packages/mastani/laravel-google-static-map)\n[![Latest Unstable Version](https://poser.pugx.org/mastani/laravel-google-static-map/v/unstable)](https://packagist.org/packages/mastani/laravel-google-static-map)\n[![License](https://poser.pugx.org/mastani/laravel-google-static-map/license)](https://packagist.org/packages/mastani/laravel-google-static-map)\n\n### Installation in Laravel 5.5 and up\n\n```bash\n$ composer require mastani/laravel-google-static-map\n```\n\nThe package will automatically register itself.\n\n### Installation in Laravel 5.4\n\n```bash\n$ composer require mastani/laravel-google-static-map\n```\n\nNext up, the service provider must be registered:\n\n```php\n// config/app.php\n\n'providers' =\u003e [\n    ...\n    Mastani\\GoogleStaticMap\\GoogleStaticMapServiceProvider::class,\n];\n```\n\n### Installation without Laravel\n\nAnother way is install the component through [composer](https://getcomposer.org/download/).\n\nEither run\n```bash\n$ composer require mastani/laravel-google-static-map\n```\nor add\n```json\n\"mastani/laravel-google-static-map\": \"dev-master\"\n```\nto the require section of your composer.json.\n\n## Usage\n\n```php\n$map = new \\Mastani\\GoogleStaticMap\\GoogleStaticMap('Place google map API key or leave it empty');\n$url = $map-\u003esetCenter('Tehran')\n           -\u003esetMapType(\\Mastani\\GoogleStaticMap\\MapType::RoadMap)\n           -\u003esetZoom(14)\n           -\u003esetSize(600, 600)\n           -\u003esetFormat(\\Mastani\\GoogleStaticMap\\Format::JPG)\n           -\u003eaddMarker('Tehran', '1', 'red', \\Mastani\\GoogleStaticMap\\Size::Small)\n           -\u003eaddMarkerLatLng(35.6907488, 51.3919293, '1', 'red', \\Mastani\\GoogleStaticMap\\Size::Small)\n           -\u003emake(); // Return url contain map address.\n           // or\n           -\u003edownload($path); // Download map image\n```\n\n## Function\n\n| Function | Description |\n| :--- | :--- |\n| setSecret(secret) | Set signing secret key. |\n| setCenter(location) | Set map center with address. |\n| setCenterLatLng(latitude, longitude) | Set map center with latitude and longitude. |\n| setZoom(zoom) | Set map zoom. |\n| setScale(scale) | Set map scale. |\n| setSize(width, height) | Set map size. |\n| setMapType(type as MapType) | Set map type. |\n| setMapId(id) | Set a map ID previously created in Cloud Console.  |\n| setFormat(format as Format) | Set map format. |\n| addMarker(center, label, color, size) | Add marker to map. |\n| addMarkerLatLng(latitude, longitude, label, color, size) | Add marker to map with latitude and longitude. |\n| addMarkerWithIcon(center, icon, shadow) | Add custom marker to map. |\n| addMarkerLatLngWithIcon(latitude, longitude, icon, shadow) | Add marker to map with latitude and longitude. |\n| make() | Make url string. |\n| download($path = 'current path', $name_length = 10) | Download map image in provided path. |\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%2Fmastani%2Flaravel-google-static-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastani%2Flaravel-google-static-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastani%2Flaravel-google-static-map/lists"}