PHPackages                             nwn-software/maplibre - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nwn-software/maplibre

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nwn-software/maplibre
=====================

Package to display maps using MapLibre

4.0.2(3mo ago)583[4 PRs](https://github.com/NWN-Software/maplibre/pulls)MITJavaScriptPHP ^8.1CI passing

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/NWN-Software/maplibre)[ Packagist](https://packagist.org/packages/nwn-software/maplibre)[ Docs](https://github.com/nwn-software/maplibre)[ GitHub Sponsors](https://github.com/NWN-Software)[ RSS](/packages/nwn-software-maplibre/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)Dependencies (10)Versions (15)Used By (0)

Package to display maps using MapLibre
======================================

[](#package-to-display-maps-using-maplibre)

[![Latest Version on Packagist](https://camo.githubusercontent.com/96b33b43b6f764923d502797c6056085457a50e62bd116f4948159823f9375e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e776e2d736f6674776172652f6d61706c696272652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nwn-software/maplibre)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3e6a1474eddd9ecdaa440f59f1d9d921d81d1179305540a66d89ef9e76af3869/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e776e2d736f6674776172652f6d61706c696272652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/nwn-software/maplibre/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/dbd4b626435c7152b22a74bfaca6188a157552ce9e83efc7dec86b4e49d5996b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e776e2d736f6674776172652f6d61706c696272652f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/nwn-software/maplibre/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8584020a32ed7888f7c5532d3cc45f8f937eb4dfd5bf7cd9a00c8335146c8326/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e776e2d736f6674776172652f6d61706c696272652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nwn-software/maplibre)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

[![Map](art/map.jpeg)](art/map.jpeg)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require nwn-software/maplibre
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="maplibre-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="maplibre-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="maplibre-views"
```

This is the contents of the published config file:

```
return [
    'style' => env('MAPLIBRE_STYLE', 'https://demotiles.maplibre.org/style.json'),
];
```

Usage
-----

[](#usage)

1. Register the plugin on your panel

```
MaplibrePlugin::make()
    ->style(config('maplibre.style'))
```

2. Create a filament widget

```
php artisan make:filament-widget MapWidget
```

2. Extend with the `NWNSoftware\Maplibre\Widgets\MapLibreWidget`

```
