Maps for Laravel

Seamlessly integrate beautiful, interactive maps into your Laravel projects with an elegant developer experience.

terminal
composer require kwasii/livewire-mapcn

Map Components

Point Marker

Single location display

12
5

Clustering

Group overlapping markers

Route Paths

Draw lines between points

Technical FAQ

Is this package compatible with Livewire v3?

Yes — livewire-mapcn is built for Laravel Livewire and designed to integrate seamlessly with Livewire v3 (utilizing Blade components and Livewire events for interactivity). It depends on Alpine.js and Tailwind for frontend behaviors, so make sure those are installed too.

Which map providers or tile sources does livewire-mapcn support?

Out of the box, it supports multiple MapLibre-based providers:

  • carto-positron, carto-voyager, carto-dark-matter (Carto)
  • osm-raster (standard OpenStreetMap raster tiles)
  • Custom styles via your own MapLibre style JSON URL

So while it’s built on MapLibre (an open-source alternative to Mapbox), you’re not limited to a single tile provider — you can plug in custom styles or providers via the provider or style props.

Do I need to compile or publish custom assets for this package?

Not necessarily.

By default, the package injects its assets automatically when you include the Blade directives in your layout:

@livewireMapStyles
@livewireMapScripts

However, you can publish configuration and assets if you want to host them locally or customize them:

php artisan vendor:publish --tag="livewire-mapcn-config"
php artisan vendor:publish --tag="livewire-mapcn-assets"

This gives you control over maps assets without relying on CDN injection.