{"id":17343483,"url":"https://github.com/firesphere/silverstripe-openstreetmaps","last_synced_at":"2025-03-27T09:41:45.158Z","repository":{"id":194821645,"uuid":"691934258","full_name":"Firesphere/silverstripe-openstreetmaps","owner":"Firesphere","description":"Silverstripe Open Street Maps field and frontend map","archived":false,"fork":false,"pushed_at":"2023-11-22T08:12:56.000Z","size":3397,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T14:30:17.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Firesphere.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":"2023-09-15T07:45:20.000Z","updated_at":"2023-09-18T08:41:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"403269d4-ecec-476a-a852-423b37d8a7a3","html_url":"https://github.com/Firesphere/silverstripe-openstreetmaps","commit_stats":null,"previous_names":["firesphere/silverstripe-openstreetmaps"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-openstreetmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-openstreetmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-openstreetmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firesphere%2Fsilverstripe-openstreetmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firesphere","download_url":"https://codeload.github.com/Firesphere/silverstripe-openstreetmaps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245820451,"owners_count":20677835,"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-10-15T16:09:30.983Z","updated_at":"2025-03-27T09:41:45.130Z","avatar_url":"https://github.com/Firesphere.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moved to codeberg\n\nhttps://codeberg.org/Firesphere/silverstripe-openstreetmaps\n\n# Openstreetmaps for Silverstripe\n\n[GPL v3 or later](LICENSE.md)\n\nUsage:\n\n```dotenv\nMAPBOX_TOKEN=MyMapboxTokenSecret\n```\n\nStatic image:\n\n```php\n        /** @var Location $location */\n        $location = Location::get()-\u003elast();\n\n        $service = new OpenStreetmapService();\n        $image = $service-\u003egetStaticMapImage($location, 500, 500, 15);\n        echo $image-\u003eforTemplate();\n        exit;\n\n```\n\nThe following will add a map to a div on your page with id `map`.\n\nIf the div doesn't exist, things will break ;)\n\n```php\n        Requirements::javascript('firesphere/openstreetmaps:dist/js/main.js');\n        Requirements::css('firesphere/openstreetmaps:dist/css/main.css');\n        $token = Environment::getEnv('MAPBOX_TOKEN');\n        Requirements::insertHeadTags(\n            \u003c\u003c\u003cJS\n\u003cscript type=\"text/javascript\"\u003evar mapboxtoken = \"$token\";\u003c/script\u003e\nJS\n        );\n        $service = new OpenStreetmapService();\n        $locations = Location::get();\n        if ($locations-\u003eexists()) {\n            $service-\u003eaddLocations($locations-\u003esort('Primary DESC'));\n        }\n\n```\n\n# Did you read this entire readme? You rock!\n\nPictured below is a cow, just for you.\n\n```\n               /( ,,,,, )\\\n              _\\,;;;;;;;,/_\n           .-\"; ;;;;;;;;; ;\"-.\n           '.__/`_ / \\ _`\\__.'\n              | (')| |(') |\n              | .--' '--. |\n              |/ o     o \\|\n              |           |\n             / \\ _..=.._ / \\\n            /:. '._____.'   \\\n           ;::'    / \\      .;\n           |     _|_ _|_   ::|\n         .-|     '==o=='    '|-.\n        /  |  . /       \\    |  \\\n        |  | ::|         |   | .|\n        |  (  ')         (.  )::|\n        |: |   |;  U U  ;|:: | `|\n        |' |   | \\ U U / |'  |  |\n        ##V|   |_/`\"\"\"`\\_|   |V##\n           ##V##         ##V##\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiresphere%2Fsilverstripe-openstreetmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiresphere%2Fsilverstripe-openstreetmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiresphere%2Fsilverstripe-openstreetmaps/lists"}