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

Phpgmaps Laravel Package

genealabs/phpgmaps

PHPGmaps is a Laravel package that integrates Google Maps into your applications, offering helpers for maps, markers, geocoding, and directions with a simple, fluent API.

View on GitHub
Deep Wiki
Context7

genealabs/phpgmaps is a lightweight, framework-agnostic PHP client for the Google Maps APIs. It provides a clean, object-oriented interface for common mapping tasks, so Laravel and standalone PHP applications can work with location data without manually building HTTP requests or parsing raw API responses.

  • Geocoding and reverse geocoding for address and coordinate conversion
  • Directions and distance calculations for route planning
  • Simple API key configuration and structured responses
  • Framework-agnostic design suitable for Laravel or plain PHP
  • Helpers for common Google Maps services
Frequently asked questions about Phpgmaps
How do I install genealabs/phpgmaps in a Laravel application?
Install it with Composer using composer require genealabs/phpgmaps, then register the service provider and facade alias in your Laravel 5.x config. Publish the package config file and set your Google Maps API key. The mechanical setup is small, but the package does not supply caching, retries, or an abstraction layer, so plan that containment work separately.
Which Laravel and PHP versions does genealabs/phpgmaps support?
The package targets the Laravel 5.x era and its last release was 2017-10-14, so modern Laravel and PHP versions are not officially verified. The repository is archived and has no compatibility patch path. Test it on a throwaway branch before any framework or PHP upgrade and be prepared to replace it.
How do I add a Google map with markers and info windows in a Blade view?
The package is designed to let you embed maps in Blade using components and directives with minimal code. You add a map, then attach markers and info windows through the package's API and config options. Treat any user-influenced marker title, label, or info-window content as untrusted and escape it before output.
How do I configure the Google Maps API key and map styles?
Publish the package config file and set your API key there, along with map options and styles. The package predates Google's current restriction types and billing requirements, so confirm you have a billing-enabled Cloud project and use separate keys for server-side and browser-side usage where needed. Restrict each key appropriately.
Is genealabs/phpgmaps still maintained?
No. The repository is archived and the last release was 2017-10-14, with a single-maintainer lineage and no CVE response path. It will break during a Laravel or PHP version bump, likely mid-upgrade when the team has the least slack. Give any remaining use an owner and a declared end-of-life date.
What are good alternatives to genealabs/phpgmaps for Laravel?
For simple embedding, call the official Google Maps JavaScript API directly from a small Blade component you control. For server-side geocoding or directions, build a thin adapter over Google's Maps web services behind an internal contract. That gives you caching, timeout handling, status normalization, and a driver flag the old wrapper does not provide.
Does genealabs/phpgmaps handle Google API errors such as ZERO_RESULTS or REQUEST_DENIED?
It is a thin request builder that returns raw decoded Google payloads, so it does not normalize vendor statuses for you. Google can return HTTP 200 with ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, or OVER_DAILY_LIMIT in the body, which can look like empty data or a restricted key. Check the status field at every call site, log failures, and surface a clear error instead of treating it as no results.
Is genealabs/phpgmaps safe for user-supplied marker titles or info-window content?
This generation of wrapper interpolates titles, info-window content, and address strings directly into generated JavaScript, so any user-influenced string reaching a marker or label is an XSS injection point. Escape and sanitize all such content, or avoid passing user data into the map output. If the application ships a Content Security Policy, review the inline script output before trusting it.
Can I use genealabs/phpgmaps with a strict Content Security Policy?
The package emits inline script, which fails under any CSP that does not allow unsafe-inline, and it has no concept of a nonce. If your application already ships a CSP, that inline output is a live defect rather than a future concern. Refactor the map output to an external script with a nonce, or use the Google Maps JavaScript API directly.
Does genealabs/phpgmaps work for server-side geocoding and directions in production?
It can make server-side geocoding and directions calls with less boilerplate, but it returns raw Google payloads rather than domain objects. That means Google's response shape leaks into every call site unless you introduce your own Geocoder or RouteEstimator contract. It is acceptable only for internal, low-traffic, read-only use; add caching, timeouts, retries, output escaping, and a feature flag to switch drivers.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource