{"id":18574917,"url":"https://github.com/mattsparks/staticmaps","last_synced_at":"2025-04-10T08:30:40.028Z","repository":{"id":57056482,"uuid":"96126806","full_name":"mattsparks/StaticMaps","owner":"mattsparks","description":"A PHP library to make working with the Google Static Maps API (and, eventually, others) a little more friendly.","archived":false,"fork":false,"pushed_at":"2017-07-07T01:52:08.000Z","size":299,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T18:46:52.458Z","etag":null,"topics":["google-maps","google-static-maps-api","library","php","static-maps","static-maps-api"],"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/mattsparks.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-07-03T15:44:34.000Z","updated_at":"2022-10-03T14:16:31.000Z","dependencies_parsed_at":"2022-08-24T07:30:22.581Z","dependency_job_id":null,"html_url":"https://github.com/mattsparks/StaticMaps","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/mattsparks%2FStaticMaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsparks%2FStaticMaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsparks%2FStaticMaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsparks%2FStaticMaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattsparks","download_url":"https://codeload.github.com/mattsparks/StaticMaps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248185179,"owners_count":21061468,"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":["google-maps","google-static-maps-api","library","php","static-maps","static-maps-api"],"created_at":"2024-11-06T23:16:53.857Z","updated_at":"2025-04-10T08:30:39.747Z","avatar_url":"https://github.com/mattsparks.png","language":"PHP","readme":"# Static Maps\nA PHP library to make working with the Google Static Maps API (and, eventually, others) a little more friendly.\n\n**Note:** This library is in active development. Refactoring needs to be done, features need added, and the API needs finalized. While the code *should* be relatively stable, you're cautioned against using this in a production environment.\n\n## Installation\nComposer is the recommended method of installation.\n \n```\ncomposer require sparkscoding/static-maps\n```\n\n## Quick Example\n\n```php\nuse SparksCoding\\StaticMaps\\StaticMap;\nuse SparksCoding\\StaticMaps\\Components\\Map;\nuse SparksCoding\\StaticMaps\\Components\\Marker;\nuse SparksCoding\\StaticMaps\\Components\\Feature;\nuse SparksCoding\\StaticMaps\\Components\\Element;\nuse SparksCoding\\StaticMaps\\Components\\Path;\n\n// Initialize the map by adding your API key\n$staticMap = StaticMap::key('123yOUrAPIkeYGoeSHerE123');\n\n// Set the builder\n$staticMap-\u003esetBuilder(\n    '\\SparksCoding\\StaticMaps\\Builders\\GoogleStaticMapBuilder'\n);\n\n// Add a map\n$staticMap-\u003esetMap(\n    Map::create()-\u003ecenter('New York, NY')-\u003ezoom(10)\n);\n\n// Add a couple markers\n$staticMap-\u003eaddMarkers(\n    Marker::location('New York, NY'),\n    Marker::location('Brooklyn, NY')\n);\n\n// Style the roads\n$staticMap-\u003eaddStyles(\n    Feature::name('road')-\u003eelements(\n        Element::name('geometry')-\u003ecolor('blue')\n    )\n);\n\n// Add a path\n$staticMap-\u003eaddPath(\n  Path::points([\n      'Empire State Building',\n      'Webster Hall',\n      'The Spotted Pig',\n      'The High Line',\n      'Empire State Building',\n  ])-\u003ecolor('0x000000ff')-\u003efillcolor('0xFFFF0033')-\u003eweight(2)\n);\n\necho '\u003cimg src=\"' . $staticMap-\u003euri() . '\"\u003e';\n```\nOutput:\n\n![NY Static Map](assets/ny_example.png \"NY Static Map\")\n\n## Documentation\n\nDocumentation, including installation instructions and examples, can be found on the [Wiki](https://github.com/mattsparks/StaticMaps/wiki).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattsparks%2Fstaticmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattsparks%2Fstaticmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattsparks%2Fstaticmaps/lists"}