{"id":13406977,"url":"https://github.com/mikebronner/nova-map-marker-field","last_synced_at":"2025-03-14T11:30:54.411Z","repository":{"id":38107572,"uuid":"193125151","full_name":"mikebronner/nova-map-marker-field","owner":"mikebronner","description":"Provides an visual interface for editing latitude and longitude coordinates.","archived":true,"fork":false,"pushed_at":"2022-10-16T18:40:34.000Z","size":800,"stargazers_count":131,"open_issues_count":18,"forks_count":36,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-13T12:43:36.958Z","etag":null,"topics":["coordinates","laravel-5-package","map","marker","nova","package"],"latest_commit_sha":null,"homepage":"","language":"Vue","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/mikebronner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["mikebronner"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-06-21T15:54:53.000Z","updated_at":"2024-05-21T08:09:15.000Z","dependencies_parsed_at":"2022-09-18T00:21:26.151Z","dependency_job_id":null,"html_url":"https://github.com/mikebronner/nova-map-marker-field","commit_stats":null,"previous_names":["genealabs/nova-map-marker-field"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebronner%2Fnova-map-marker-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebronner%2Fnova-map-marker-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebronner%2Fnova-map-marker-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebronner%2Fnova-map-marker-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikebronner","download_url":"https://codeload.github.com/mikebronner/nova-map-marker-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243569239,"owners_count":20312373,"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":["coordinates","laravel-5-package","map","marker","nova","package"],"created_at":"2024-07-30T19:02:44.670Z","updated_at":"2025-03-14T11:30:53.217Z","avatar_url":"https://github.com/mikebronner.png","language":"Vue","funding_links":["https://github.com/sponsors/mikebronner"],"categories":["Vue"],"sub_categories":[],"readme":"This package has been archived until such time that it can be brought up-to-date with Laravel Nova. We have stopped using Laravel Nova, and no longer have a license for it. As such we currently cannot justify further development on this package. Please check here for availability of similar packages: https://novapackages.com\n\n# Map Marker Field for Laravel Nova\n[![GitHub (pre-)release](https://img.shields.io/github/release/GeneaLabs/nova-map-marker-field/all.svg)](https://github.com/GeneaLabs/nova-map-marker-field)\n[![Packagist](https://img.shields.io/packagist/dt/GeneaLabs/nova-map-marker-field.svg)](https://packagist.org/packages/genealabs/nova-map-marker-field)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/GeneaLabs/nova-map-marker-field/master/LICENSE)\n\n![Map Marker Field for Laravel Nova masthead image.](https://repository-images.githubusercontent.com/193125151/642cd600-9590-11e9-99d0-d77a638bf308)\n\n## Supporting This Package\nThis is an MIT-licensed open source project with its ongoing development made possible by the support of the community. If you'd like to support this, and our other packages, please consider [becoming a sponsor](https://github.com/sponsors/mikebronner).\n\nWe thank the following sponsors for their generosity, please take a moment to check them out:\n\n- [LIX](https://lix-it.com)\n\n## Requirements\n- Laravel 9.0+\n- Nova 3.9+\n\n## Installation\n1. Install the package:\n  ```sh\n  composer require genealabs/nova-map-marker-field\n  ```\n\n2. Publish the marker icon assets (this is not necessary if you are specifying\n  your own):\n  ```sh\n  php artisan vendor:publish --provider=\"GeneaLabs\\NovaMapMarkerField\\Providers\\Service\"\n  ```\n\n## Implementation\nTo create the map marker field, all that is necessary is the form label, and the\nremaining options will have defaults applied:\n```php\nuse GeneaLabs\\NovaMapMarkerField\\MapMarker;\n\nMapMarker::make(\"Location\"),\n```\n\n### Coordinate Field Names\nBy default the field will look for `latitude` and `longitude` fields on the\nmodel. However, if your model uses different names, you may customize them with\nthe `-\u003elatitude('lat')` and `-\u003elongitude('long')` methods:\n```php\nMapMarker::make(\"Location\")\n    -\u003elatitude('lat')\n    -\u003elongitude('long'),\n```\n\n### Default Settings\nYou can specify default settings for zoom level, and initial map center\ncoordinates. If not specified, the zoom level will default to 12; the\ncoordinates will default to (0, 0).\n```php\nMapMarker::make(\"Location\")\n    -\u003edefaultZoom(8)\n    -\u003edefaultLatitude(41.823611)\n    -\u003edefaultLongitude(-71.422222),\n```\n\n### Center Circle\nThe optional `centerCircle()` method allows the addition of a circle to be\nrendered at the centerpoint of the map.\n```php\nMapMarker::make(\"Location\")\n    -\u003ecenterCircle($radiusInMeters, $color, $borderWidth, $backgroundOpacity),\n```\n\n### Search Provider\nThe underlying search capabilities are provided by\n[leaflet-geosearch](https://github.com/smeijer/leaflet-geosearch). Please refer\nto their documentation for provider configuration. By default we use the\nESRI search provider.\n```php\nMapMarker::make(\"Location\")\n    -\u003esearchProvider('google')\n    -\u003esearchProviderKey('xxxxxxxxxxxxxxxxxxxxxxxxxxx'),\n```\n\nYou can specify a custom search label in the geosearch box:\n```php\nMapMarker::make('Location')\n    -\u003esearchLabel('Enter Address');\n```\n\n### Tile Layer\nYou are free to use any tile provider that is compatible with\n[Leaflet](https://leafletjs.com/reference-1.5.0.html#tilelayer). Please refer to\ntheir documentation on tile layer URLs. By default we use tiles provided by\nOpenStreetMap:\n```php\nMapMarker::make(\"Location\")\n    -\u003etileProvider('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png'),\n```\n\n### Recenter On Nova Custom Component Events\n- From your custom component you can trigger the recentering of the map as\n  follows:\n  ```js\n  Nova.$emit(\"recenterMapOn\", {latitude, longitude});\n  ```\n- You can define a custom event name that the MapMarker field will respond to:\n  ```php\n  MapMarker::make('Location')\n      -\u003elistenToEventName('customCenterEventTriggerName');\n  ```\n  You can then trigger the event from your custom component like so:\n  ```js\n  Nova.$emit(\"customCenterEventTriggerName\", {latitude, longitude});\n  ```\n\n## Usage\nWhen creating or editing you can search for an address or city to get the map to the general area you wish to get coordinates for. Then you can precisely position the marker by dragging the map -- the marker will always stay positioned in the middle, while you move the map under it.\n\nWhen viewing the map in on the detail page, the map and marker are not interactive, and there is no search functionality. However, the user is free to zoom in and out.\n\n## Screenshots\n### Create / Edit Field\n\u003cimg width=\"1010\" alt=\"Screen Shot 2019-06-23 at 8 16 52 AM\" src=\"https://user-images.githubusercontent.com/1791050/59978398-b241d980-9590-11e9-9adc-23e5bd9688e0.png\"\u003e\n\n### Detail Field\n\u003cimg width=\"1007\" alt=\"Screen Shot 2019-06-23 at 8 17 43 AM\" src=\"https://user-images.githubusercontent.com/1791050/59978392-a5bd8100-9590-11e9-9ab7-576e7a935dff.png\"\u003e\n\n### Index Field\n\u003cimg width=\"1098\" alt=\"Screen Shot 2019-06-23 at 8 32 01 AM\" src=\"https://user-images.githubusercontent.com/1791050/59978478-778c7100-9591-11e9-9610-3c9a59ca12c4.png\"\u003e\n\n## Commitment to Quality\nDuring package development I try as best as possible to embrace good design and development practices, to help ensure that this package is as good as it can\nbe. My checklist for package development includes:\n\n-   ✅ Achieve as close to 100% code coverage as possible using unit tests.\n-   ✅ Eliminate any issues identified by SensioLabs Insight and Scrutinizer.\n-   ✅ Be fully PSR1, PSR2, and PSR4 compliant.\n-   ✅ Include comprehensive documentation in README.md.\n-   ✅ Provide an up-to-date CHANGELOG.md which adheres to the format outlined\n    at \u003chttp://keepachangelog.com\u003e.\n-   ✅ Have no PHPMD or PHPCS warnings throughout all code.\n\n## Contributing\nPlease observe and respect all aspects of the included Code of Conduct \u003chttps://github.com/GeneaLabs/nova-map-marker-field/blob/master/CODE_OF_CONDUCT.md\u003e.\n\n### Reporting Issues\nWhen reporting issues, please fill out the included template as completely as\npossible. Incomplete issues may be ignored or closed if there is not enough\ninformation included to be actionable.\n\n### Submitting Pull Requests\nPlease review the Contribution Guidelines \u003chttps://github.com/GeneaLabs/nova-map-marker-field/blob/master/CONTRIBUTING.md\u003e. Only PRs that meet all criterium will be accepted.\n\n## If you ❤️ open-source software, give the repos you use a ⭐️.\nWe have included the awesome `symfony/thanks` composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run `composer thanks` after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebronner%2Fnova-map-marker-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebronner%2Fnova-map-marker-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebronner%2Fnova-map-marker-field/lists"}