Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Googlmapper

Googlmapper Laravel Package

cornford/googlmapper

GooglMapper makes it easy to add Google Maps to Laravel apps. Create maps, markers, info windows, and overlays with a simple PHP API, customize controls and styles, and render interactive maps in Blade views without writing JavaScript.

View on GitHub
Deep Wiki
Context7

GooglMapper is a Laravel package that makes embedding Google Maps into your views effortless. It provides a fluent PHP API for defining maps, markers, and overlays, then automatically generates and injects the required JavaScript—so you never have to hand-write map code. Maps can be configured and rendered directly from controllers or Blade templates through the Mapper facade.

  • Fluent API for creating maps, markers, and info windows
  • Supports circles, polylines, polygons, and rectangles
  • Configurable centre, zoom, map type, and UI controls
  • One-line Blade rendering with {!! Mapper::render() !!}
  • Integrates cleanly via Laravel service provider and facade
Frequently asked questions about Googlmapper
Which Laravel and PHP versions does cornford/googlmapper support?
The package's last release was in 2019, so its Composer constraints target older Laravel and PHP versions rather than the modern Laravel 10/11 and PHP 8.x stack. Before adopting it, check the composer.json constraints and run a time-boxed Composer install against your exact Laravel and PHP versions. If conflicts appear, do not force dependency overrides; treat that as a stop signal.
How do I install cornford/googlmapper in Laravel?
Install it with Composer and register the package service provider and GooglMapper facade according to the README, then publish the configuration file. You configure your Google Maps API key in the published config or environment file. Because the package is stale, confirm facade discovery and config publishing work on your Laravel version during a short spike before wiring it into real views.
How do I set the Google Maps API key for GooglMapper?
The API key is typically supplied through the package config file after publishing, ideally sourced from an environment variable rather than hardcoded. Restrict the key in the Google Cloud console by HTTP referrer and API so it cannot be abused if exposed. Since the key is rendered into client-side JavaScript, review CSP and key-restriction settings before going to production.
How do I add markers and info windows to a map with GooglMapper in Laravel?
You build a map through the GooglMapper facade, adding markers and info windows with the package's fluent calls, then render it inside a Blade view. Keep those facade calls behind a small adapter or Blade component so map markup is not scattered across templates. That wrapper also makes it far cheaper to replace the package later with direct Google Maps JavaScript API calls.
Is cornford/googlmapper still maintained?
The evaluation notes the last release was in 2019 with stale ecosystem activity and zero dependents, which points to an effectively abandoned package. Community support is limited, so your team would own compatibility fixes and eventual replacement. Adopt it only for constrained legacy or low-risk map needs with a named owner and an explicit exit plan.
Does GooglMapper work with Laravel 11 and PHP 8?
That is unproven and likely to be a problem, because the package's release history predates Laravel 11 and modern PHP 8.x. Verify by running a short Composer spike on the exact target versions and testing facade discovery, config publishing, and Blade rendering. If Composer conflicts occur, stop rather than overriding constraints.
Can I use GooglMapper in an API-only, Inertia, or SPA Laravel application?
GooglMapper is a server-side convenience wrapper around the Google Maps JavaScript API, so it suits Blade-rendered views rather than API-first services or JavaScript-owned front ends. In Inertia, Livewire-heavy, or SPA architectures, rendering maps directly in the front end is usually cleaner. Using the facade in those stacks creates tight coupling between presentation dependencies and your backend templates.
How do I test GooglMapper map output in Laravel?
The package emits map markup and JavaScript rather than a clean data API, so testing is mostly limited to asserting rendered output through HTTP or view tests. Wrap usage in your own MapRenderer interface or Blade component and test your adapter's contract instead of the facade directly. This keeps tests stable if the package is abandoned or replaced and avoids spreading facade calls through the codebase.
What are the alternatives to GooglMapper for Google Maps in Laravel?
The most reliable alternative is using the Google Maps JavaScript API directly inside a Blade component or front-end bundle, which removes a stale dependency and gives you full control over loading patterns and keys. You can also evaluate maintained Composer packages for map rendering, but verify Laravel version support and release activity first. For many Laravel apps, a thin internal wrapper around the official API is simpler than any third-party abstraction.
How do I migrate away from GooglMapper or avoid lock-in?
Treat GooglMapper as a tactical accelerator, not a strategic dependency: hide it behind an internal MapRenderer interface or Blade component and keep facade calls out of feature code. Define replacement criteria up front, such as a Laravel upgrade conflict, a Google Maps API change, or loss of maintainer activity. When you switch to direct Google Maps JavaScript API usage, only the adapter needs rewriting.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager