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

Google Map Laravel Package

ivory/google-map

Laravel package for adding Google Maps to your application with a simple, configurable API. Build maps, add markers and info windows, and customize map options in Blade views without writing JavaScript by hand.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What the package is. ivory/google-map (maintained fork by bresam) is a framework-agnostic PHP object model for Google Maps API v3. It has two distinct capability surfaces that should be evaluated separately: (1) a map-building/serialization layer — typed PHP objects for maps, markers, info windows, polylines, encoded polylines, map types, controls, and overlays that render to JS/HTML; and (2) a web-service client layer — geocoding, directions, distance matrix, places, and timezone wrappers that call Google REST endpoints through an injected HTTP adapter.

Architecture fit. The map-building layer is a clean fit for server-driven map configuration: it lets us compose map state in PHP, test it without a browser, and emit consistent config into Blade views. It is stateless and imposes no runtime model. The service layer is a fit only if we genuinely need server-side calls to Google (e.g., geocoding addresses at import time); otherwise we are adding an HTTP abstraction and a quota-bearing dependency to solve a problem the browser JS SDK already solves. The library is not a Laravel package: there is no service provider, config file, facade, or auto-discovery. The historic first-party integration is a Symfony bundle and is not transferable.

Integration feasibility. Composer-installable and MIT-licensed, so the mechanical integration is low-friction — roughly a service provider binding the builders/factories as singletons, a config/google-map.php for the API key, and one or two Blade components. The main work is the HTTP adapter: the service layer expects a PSR-18/HTTPlug-style adapter, which we must bridge to Laravel's HTTP client or Guzzle and then wrap with caching, retries, and quota handling. Expect one to three days for a production-grade map-only integration and one to two weeks for the web-service layer including tests and caching.

Technical risk. The dominant risk is project health, quantified: 13 stars, 0 dependents, a single effective maintainer, and a fork lineage from an abandoned upstream. An opportunity score of 37.69 and overall score of 0.525 place this firmly in "tactical utility, not strategic dependency" territory. The recent release (2025-09-04) is genuinely reassuring for PHP-version currency, but public usage evidence is essentially absent, so we cannot lean on community defect discovery. Secondary risks: Google's own API evolution (Places API (New), pricing/quota changes, JS API channel updates) will not necessarily be tracked by a one-person fork; API-key handling and quota exposure if the service layer is used carelessly; potential XSS/JSON-injection if user-supplied content is serialized into map config unescaped; and version-constraint conflicts with Laravel's bundled Symfony components (notably options-resolver), which must be verified rather than assumed.

Key questions. Do we need the web-service client at all, or only map rendering? Who is the internal owner if the fork stalls, and are we prepared to vendor/fork it (MIT permits this)? What are the exact PHP and dependency constraints, and do they resolve cleanly against our Laravel and Symfony component versions? What test coverage and CI exist in the fork? How is the API key scoped and restricted (HTTP referrer / IP / API restrictions), and what is our quota and cost ceiling? Does the serialization layer escape user-controlled strings by default?

Integration Approach

Stack fit. Good for Laravel 10/11/12 on PHP 8.1+, but only as a library, not a package. We adopt it as a Composer dependency behind our own thin application layer: a GoogleMapServiceProvider, a config file, a MapBuilder/MapFactory wrapper, and Blade components (<x-google-map>) so that view code never touches vendor classes directly. That wrapper is the seam that makes replacement cheap if the fork dies — the single most important design decision here.

Migration path. If map configuration is currently hand-written as inline JS arrays in Blade templates, migrate incrementally: introduce the wrapper and reproduce one existing map through it, verify byte-level parity of the emitted config, then convert remaining maps map-by-map. Do not attempt to migrate web-service call sites at the same time; they carry different risk and different tests.

Compatibility. Resolve dependency constraints in a scratch branch before committing. Pin the vendor version explicitly (no floating constraint) and commit composer.lock. Add a CI job that runs the integration tests against the next PHP minor so the fork's lag becomes visible early. Where the service layer needs a PSR-18 client, prefer a small first-party adapter over adding HTTPlug plus a Guzzle adapter plus discovery — fewer transitive dependencies, clearer failure behavior.

Sequencing. (1) Constraint/dependency spike and a throwaway proof of concept rendering one real map. (2) Service provider, config, and API-key secret management with restrictions applied at the Google Cloud project level. (3) Blade component and serialization-parity tests, including escaping tests with hostile marker labels and info-window HTML. (4) Ship one production surface. (5) Only then evaluate the web-service layer, and only for a use case that provably cannot be done client-side. (6) Document the fork contingency (internal fork location, patch policy) before the second surface adopts it.

Operational Impact

Maintenance. Low ongoing effort but non-zero ownership: someone must track the fork's releases, PHP version bumps, and Google API deprecations. Treat it as a vendored-style dependency — budget a recurring review each PHP minor cycle. The MIT license means we can fork and patch internally, which converts the bus-factor risk from "blocking" to "inconvenient," provided the wrapper seam exists.

Support. No vendor, no SLA, GitHub issues only. Our team is the support tier. Expect to self-diagnose anything non-trivial; keep the wrapper thin enough that the failure surface we own is small and readable.

Scaling. The map-building layer is cheap and stateless — it scales exactly as our PHP workers do, with no additional consideration. The web-service layer is the opposite: every call is a metered, rate-limited, externally dependent request. If adopted, it needs Redis caching keyed on normalized query parameters, queued/async execution for anything in a request path, and hard quota alarms in Google Cloud plus application-level rate limiting.

Failure modes. Google quota exhaustion or billing suspension breaking geocoding-dependent flows; API-key leakage via client-side exposure (mitigated by referrer/IP restrictions and separate server vs. browser keys); upstream abandonment leaving the package incompatible with a future PHP or Laravel release; silent serialization changes altering map behavior after a patch upgrade; unescaped user content producing broken or injectable map config; and HTTP adapter misconfiguration surfacing as opaque null returns rather than exceptions, which is the failure mode most likely to reach production undetected. Each of these has a cheap mitigation: pinned version, parity tests, escaping tests, quota alarms, and explicit exception mapping in the adapter.

Ramp-up. A mid-level Laravel developer can be productive on the map-building layer in under a day, because the object model is conventional and the documentation burden is low. The web-service layer adds roughly a week of genuine work once caching, retries, error mapping, and key management are included — and that estimate assumes no surprises in the HTTP adapter. Overall verdict for a TPM: approve for the map-rendering use case behind a wrapper, with a pinned version and a documented fork contingency; defer the web-service layer until a specific requirement justifies the quota, cost, and single-maintainer exposure.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console