{"id":20300882,"url":"https://github.com/fitzwilliammuseum/maps","last_synced_at":"2026-05-11T10:32:38.132Z","repository":{"id":105139442,"uuid":"405054567","full_name":"FitzwilliamMuseum/maps","owner":"FitzwilliamMuseum","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-17T15:30:41.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T06:29:27.280Z","etag":null,"topics":["laravel","maps"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/FitzwilliamMuseum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"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}},"created_at":"2021-09-10T11:18:00.000Z","updated_at":"2021-09-17T15:30:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a5bc25a-5797-4e6f-aec3-d8289f14b63f","html_url":"https://github.com/FitzwilliamMuseum/maps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FitzwilliamMuseum/maps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FitzwilliamMuseum%2Fmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FitzwilliamMuseum%2Fmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FitzwilliamMuseum%2Fmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FitzwilliamMuseum%2Fmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FitzwilliamMuseum","download_url":"https://codeload.github.com/FitzwilliamMuseum/maps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FitzwilliamMuseum%2Fmaps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32890650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"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":["laravel","maps"],"created_at":"2024-11-14T16:21:55.029Z","updated_at":"2026-05-11T10:32:38.116Z","avatar_url":"https://github.com/FitzwilliamMuseum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maps for your Laravel application\n\n[![GitLab Repository](https://img.shields.io/badge/GitLab-gonoware/laravel--maps-blue.svg?logo=gitlab\u0026style=flat-square\u0026longCache=true)](https://gitlab.com/gonoware/laravel-maps)\n[![Laravel Version](https://img.shields.io/badge/Laravel-8-blue.svg?logo=laravel\u0026style=flat-square\u0026longCache=true)]()\n[![Latest Stable Version](https://poser.pugx.org/gonoware/laravel-maps/v/stable?format=flat-square)](https://packagist.org/packages/gonoware/laravel-maps)\n[![StyleCI](https://gitlab.styleci.io/repos/8146646/shield)](https://gitlab.styleci.io/repos/8146646)\n[![License](https://poser.pugx.org/gonoware/laravel-maps/license?format=flat-square)](https://packagist.org/packages/gonoware/laravel-maps)\n[![Total Downloads](https://poser.pugx.org/gonoware/laravel-maps/downloads?format=flat-square)](https://packagist.org/packages/gonoware/laravel-maps)\n\nUsing this package you can easily display maps on your website.\n\nSupported map services: \n * Google Maps\n * OpenStreetMap\n * Bing Maps\n * MapQuest\n * Yandex Maps\n * MapKit (beta)\n\n\u003e Note: Yandex Maps API does not work in Chrome.\n\nFor Laravel 5.5 use version [1.0.3](https://gitlab.com/gonoware/laravel-maps/tree/v1.0.3)\n\n## Features\n| | Google Maps | OpenStreetMap | Bing Maps | MapQuest | Yandex Maps | MapKit |  \n|---|:---:|:---:|:---:|:---:|:---:|:---:|\n| [Map](#basic-map) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |\n| [Markers](#map-with-markers) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |\n| [Marker Links](#marker-links) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |\n| [Marker Popups](#marker-popups) | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ |\n| [Custom Marker Icons](#custom-marker-icons) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |\n| [Marker Click Event](#marker-clicked) | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | \n\n## Installation\n\nThis package can be installed through Composer.\n```bash\ncomposer require gonoware/laravel-maps\n```\nLaravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add \nthe ServiceProvider.\n\nPublish the compiled assets to `public/vendor/maps` with one of these \ncommands:\n```bash\nphp artisan vendor:publish --tag=maps\n```\n```bash\nphp artisan vendor:publish --provider=\"GoNoWare\\Maps\\MapsServiceProvider\" --tag=public\n```\n\u003e When updating, use the `--force` switch to overwrite existing assets:\n```bash\nphp artisan vendor:publish --tag=maps --force\n```\n\nOptionally, you can also publish the config file of this package with this \ncommand to `config/vendor/maps.php`:\n```bash\nphp artisan vendor:publish --provider=\"GoNoWare\\Maps\\MapsServiceProvider\" --tag=config\n```\n\n\n## Usage\n\nLoad the map styles by adding the following directive to your\nBlade template before the `\u003c/head\u003e` closing tag.\n```php\n@mapstyles\n```\n\nThen add the following directive to your Blade template\nbefore the `\u003c/body\u003e` closing tag, to load the map scripts.\n```php\n@mapscripts\n```\n\n### Basic Map\nDisplay a map by adding the `@map` directive to your Blade template.\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n])\n```\n\n### Map With Markers\nYou can also show markers / pins / annotations:\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n    'markers' =\u003e [\n        [\n            'title' =\u003e 'Go NoWare',\n            'lat' =\u003e 48.134664,\n            'lng' =\u003e 11.555220,\n        ],\n    ],\n])\n```\n\n### Marker Links\nOpen a url when a marker is clicked.\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n    'markers' =\u003e [\n        [\n            'title' =\u003e 'Go NoWare',\n            'lat' =\u003e 48.134664,\n            'lng' =\u003e 11.555220,\n            'url' =\u003e 'https://gonoware.com',\n        ],\n    ],\n])\n```\n\n### Marker Popups\nShow a popup when a marker is clicked. The `popup` attribute may contain HTML markup.\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n    'markers' =\u003e [\n        [\n            'title' =\u003e 'Go NoWare',\n            'lat' =\u003e 48.134664,\n            'lng' =\u003e 11.555220,\n            'popup' =\u003e '\u003ch3\u003eDetails\u003c/h3\u003e\u003cp\u003eClick \u003ca href=\"https://gonoware.com\"\u003ehere\u003c/a\u003e.\u003c/p\u003e',\n        ],\n    ],\n])\n```\n\n### Custom Marker Icons\nShow a custom marker icon. Absolute and relative URLs are supported.\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n    'markers' =\u003e [\n        [\n            'title' =\u003e 'Go NoWare',\n            'lat' =\u003e 48.134664,\n            'lng' =\u003e 11.555220,\n            'url' =\u003e 'https://gonoware.com',\n            'icon' =\u003e 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png',\n        ],\n    ],\n])\n```\n\nAdditionally you may also specify the icon image size and anchor in pixels. The image will be aligned so that the tip of the icon is at the marker's geographical location.\n```php\n@map([\n    'lat' =\u003e 48.134664,\n    'lng' =\u003e 11.555220,\n    'zoom' =\u003e 6,\n    'markers' =\u003e [\n        [\n            'title' =\u003e 'Go NoWare',\n            'lat' =\u003e 48.134664,\n            'lng' =\u003e 11.555220,\n            'url' =\u003e 'https://gonoware.com',\n            'icon' =\u003e 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png',\n            'icon_size' =\u003e [20, 32],\n            'icon_anchor' =\u003e [0, 32],\n        ],\n    ],\n])\n```\n\n## Styling\n\nTo adjust the height of the map use CSS:\n```css\n.gnw-map-service {\n    height: 750px;\n}\n```\n\nChange the background of the map container:\n```css\n.gnw-map-service__osm {\n    background: rgb(221, 221, 221);\n}\n```\n\nFade in by default when using Bootstrap 3.3.7 or 4+. To replicate or modify the animation use following CSS:\n```css\n.gnw-map.fade {\n    transition: opacity .15s linear;\n}\n.gnw-map.fade:not(.show) {\n    opacity: 0;\n}\n```\n\n## Events\n\n### Map Initialized\nThe event `LaravelMaps:MapInitialized` will be dispatched when a map and its markers were initialized. The DOM element, map, \nmarkers and service name can be accessed via the event details.\n```js\nwindow.addEventListener('LaravelMaps:MapInitialized', function (event) {\n   var element = event.detail.element;\n   var map = event.detail.map;\n   var markers = event.detail.markers;\n   var service = event.detail.service;\n   console.log('map initialized', element, map, markers, service);\n});\n```\nPlease refer to the respective documentation for advanced customization:\n * [Google Maps](https://developers.google.com/maps/documentation/javascript/tutorial)\n * [OpenStreetMap](https://leafletjs.com/reference-1.6.0.html)\n * [Bing Maps](https://leafletjs.com/reference-1.6.0.html)\n * [MapQuest](https://leafletjs.com/reference-1.6.0.html)\n * [Yandex Maps](https://tech.yandex.com/maps/jsapi/)\n * [MapKit (beta)](https://developer.apple.com/documentation/mapkitjs)\n\n### Marker Clicked\nThe event `LaravelMaps:MarkerClicked` will be dispatched when a marker was clicked. The DOM element, map, marker and \nservice name can be accessed via the event details.\n```js\nwindow.addEventListener('LaravelMaps:MarkerClicked', function (event) {\n    var element = event.detail.element;\n    var map = event.detail.map;\n    var marker = event.detail.marker;\n    var service = event.detail.service;\n    console.log('marker clicked', element, map, marker, service);\n});\n```\n\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n\n## Security\n\nIf you discover any security related issues, please email [em@gonoware.com](mailto:em@gonoware.com) \ninstead of using the issue tracker.\n\n\n## Credits\n\n- [Emanuel Mutschlechner](https://gitlab.com/emanuel)\n- [Benedikt Tuschter](https://gitlab.com/benedikttuschter)\n- [All Contributors](https://gitlab.com/gonoware/laravel-maps/graphs/master)\n\n\n## License\n\n[MIT](LICENSE.md)\n \nCopyright (c) 2018-present Go NoWare\n \n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgitlab.com%2Fgonoware%2Flaravel-maps.svg?type=large)](https://app.fossa.io/projects/git%2Bgitlab.com%2Fgonoware%2Flaravel-maps?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzwilliammuseum%2Fmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffitzwilliammuseum%2Fmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffitzwilliammuseum%2Fmaps/lists"}