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

Filament Yandex Map Laravel Package

kpebedko22/filament-yandex-map

Integrate Yandex Map into Laravel Filament forms and infolists with ready-made components. Configure API keys, map center, zoom, language, geo-object modes, height, and control buttons via simple fluent methods, with optional translation publishing.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament Integration: The package is designed specifically for Filament, a modern Laravel admin panel framework, making it a natural fit for projects already using Filament. It extends Filament’s form components with Yandex Maps functionality, aligning with Filament’s declarative schema-based approach.
  • Modularity: The package follows a component-based design, allowing seamless integration into existing Filament forms without disrupting core application logic. This aligns well with Laravel’s modular ecosystem.
  • Configuration-Driven: Centralized config (services.php) and runtime overrides (via closures) enable flexibility in deployment (e.g., per-environment API keys, language settings).
  • Geospatial Modes: Supports multiple geometry modes (Placemark, Polyline, Polygon, and now MultiPolygon as of v5.1.0), covering most common geospatial input needs without requiring custom extensions.
  • Limitation: Tight coupling to Filament may restrict reuse in non-Filament Laravel apps or other PHP frameworks.

Integration Feasibility

  • Low Barrier to Entry: Installation is straightforward (Composer + config), and the package provides clear usage examples for both form fields and tables (implied by the README).
  • Yandex Maps Dependency: Requires a Yandex Maps API key (free tier available) and a Geocoder API key for suggestions. This introduces external dependencies and potential cost considerations for high-volume usage.
  • Filament Version Compatibility: Explicitly targets Filament v3.x. The package’s own version is now v5.1.0 (package semver is independent of Filament’s versioning). Compatibility with future major versions of Filament is untested (risk of breaking changes).
  • Translation Support: Optional translations can be published, but the package defaults to English (assuming Filament’s i18n system handles the rest). v5.1.0 specifically fixes a translation key regressions (PolygonRule was incorrectly using the polyline translation key), improving non-English locale correctness for polygon workflows.
  • Geometry Coverage: The addition of MultiPolygon mode in v5.1.0 broadens applicability to use cases like administrative boundary mapping, service-area definition, and multi-region coverage — previously requiring custom workarounds.

Technical Risk

  • API Key Management: Hardcoding keys in config or environment files may pose security risks if not properly secured (e.g., .env exposure in version control).
  • Frontend Dependencies: Relies on Yandex Maps JavaScript SDK. Potential conflicts with other map libraries (e.g., Leaflet, Google Maps) if used concurrently.
  • Performance: Dynamic map rendering in forms/tables could impact page load times, especially for large datasets or complex interactions. MultiPolygon geometries in particular can be heavier to render — test with representative data volumes.
  • Localization: Defaults to ru_RU; non-Russian locales may require additional configuration or translations. Note that v5.1.0 addressed a specific translation-key bug, suggesting localization is an area of active refinement.
  • Testing: Materially improved — v5.1.0 added a test suite for state handlers (PR #10). This is the first observable test coverage in the repo and directly mitigates the previous "no visible test suite" concern. Coverage is still partial (state handlers only), so broader test coverage (rendering, API integration, geometry validation) remains a gap.
  • Community Signals: Still low adoption (few stars, limited dependents) but shows active, externally-contributed maintenance: v5.1.0 includes a new contributor (@maxim3815) with three merged PRs in a single release. This is a positive health signal but still single-maintainer-adjacent.

Key Questions

  1. Filament Version Lock: Is the project locked to Filament v3.x, or could future upgrades introduce compatibility issues? Does v5.x of the package commit to a Filament compatibility policy?
  2. API Costs: What is the expected usage volume for Yandex Maps APIs? Are budgeted costs accounted for?
  3. Fallback Mechanisms: Are there backup plans if Yandex Maps APIs fail (e.g., degraded experience or static map fallback)?
  4. Geometry Requirements: Does the project need MultiPolygon support (now available in v5.1.0), or are point/polyline/polygon modes sufficient? Are further advanced features (geofencing, marker clustering, routes) required?
  5. CI/CD Impact: How will API key rotation or changes to Yandex Maps SDK affect deployment pipelines?
  6. Accessibility: Are the map controls and interactions accessible (WCAG/ADA compliant), or will additional work be required?
  7. Test Coverage Scope: The new state-handler tests are welcome, but does the team require broader coverage (rendering, integration, browser) before treating the package as production-grade?

Integration Approach

Stack Fit

  • Primary Use Case: Ideal for Filament-based admin panels requiring geospatial data input (e.g., location fields for users, assets, events, service areas, or regions).
  • Laravel Ecosystem: Works natively with Laravel’s service providers, config, and environment variables. No additional infrastructure changes required.
  • Frontend Stack: Assumes a Blade/Vite setup (Filament’s default). If using SPAs (e.g., Inertia.js), integration may require additional proxying for API keys.
  • Database: No direct DB schema changes, but the package expects latitude/longitude fields (e.g., point column) to store coordinates. MultiPolygon inputs require GeoJSON- or JSON-shaped columns rather than simple lat/lng pairs — plan schema accordingly.

Migration Path

  1. Preparation:
    • Add Yandex Maps API keys to .env:
      YANDEX_MAP_API_KEY=your_key_here
      YANDEX_MAP_SUGEST_API_KEY=your_suggest_key_here
      
    • Publish translations if non-English locales are needed:
      php artisan vendor:publish --tag="filament-yandex-map-translations"
      
  2. Configuration:
    • Update config/services.php with default map settings (center, zoom, language).
  3. Implementation:
    • Replace existing text/number fields for coordinates with YandexMap::make() in Filament forms:
      YandexMap::make('location')
          ->mode(YandexMapMode::Placemark)
          ->apiKey(env('YANDEX_MAP_API_KEY'))
          ->height('500px')
      
    • For multi-region or boundary use cases, adopt MultiPolygon mode (new in v5.1.0):
      YandexMap::make('service_area')
          ->mode(YandexMapMode::MultiPolygon)
          ->height('600px')
      
  4. Validation:
    • Ensure backend validation aligns with the map’s output (e.g., latitude/longitude fields or GeoJSON structure).
  5. Testing:
    • Test in staging with realistic data volumes to validate performance and API limits — especially for MultiPolygon rendering.
  6. Upgrade from earlier versions: Pin to v5.1.0 to pick up the PolygonRule translation-key fix and expanded geometry modes; low migration risk given the changes are additive plus one bug fix.

Compatibility

  • Filament Plugins: May conflict with other Filament plugins using similar form components (e.g., Google Maps integrations). Test for CSS/JS conflicts.
  • Caching: If using Filament’s caching, ensure map configurations (e.g., API keys) are not cached aggressively.
  • Browser Support: Yandex Maps SDK may have browser-specific quirks (e.g., legacy IE). Align with Filament’s supported browsers.
  • Laravel Versions: Compatible with Laravel 10.x+ (Filament’s LTS support). Downgrades may require adjustments.
  • Patch-Level Upgrade (v5.0.0 → v5.1.0): Non-breaking; additive features plus one bug fix. Safe upgrade path expected.

Sequencing

  1. Phase 1: Integrate into a single form/table to validate functionality.
  2. Phase 2: Roll out to high-priority modules (e.g., user profiles, event management, region/boundary mapping via MultiPolygon).
  3. Phase 3: Optimize performance (e.g., lazy-loading maps, debouncing API calls, simplifying geometry payloads).
  4. Phase 4: Monitor usage metrics and Yandex API costs; adjust quotas or keys as needed.

Operational Impact

Maintenance

  • Vendor Updates: Monitor for updates to the package and Yandex Maps SDK. Major version bumps may require testing. Recent cadence (v5.0.0 → v5.1.0) suggests regular, incremental releases.
  • API Key Rotation: Implement a process to rotate Yandex API keys securely (e.g., via Laravel Forge/Envoyer or HashiCorp Vault).
  • Translation Updates: If publishing translations, track updates from the package maintainer or community. The v5.1.0 PolygonRule translation fix is a good reminder to re-run vendor:publish --force for translation files after patch upgrades.
  • Deprecation Risk: Yandex Maps API changes could break functionality. Subscribe to Yandex’s developer notifications.

Support

  • Troubleshooting: Limited community support but improving — new external contributor in v5.1.0 indicates the maintainer is responsive and reviewing PRs. Debugging should rely on:
    • Yandex Maps documentation.
    • Filament’s GitHub issues (for integration problems).
    • Package maintainer (responsive based on recent releases).
  • Common Issues:
    • API key errors (validate .env and config).
    • Map not rendering (check JS console for SDK errors).
    • Performance lag (optimize height/zoom settings; watch MultiPolygon complexity).
    • Translation oddities (ensure translations republished after upgrading to v5.1.0).
  • Fallback Plan: Document steps to revert to manual coordinate input if the map fails.

Scaling

  • API Limits: Yandex Maps has usage limits. Monitor requests in production and implement:
    • Rate limiting on the backend.
    • Caching of geocoding results.
    • Fallback to static maps for non-critical paths.
  • Concurrency: High-traffic forms may throttle API calls. Consider:
    • Queueing geocoding requests (e.g., Laravel Queues).
    • Client-side debouncing for search suggestions.
  • Database: Ensure latitude/longitude fields are indexed for spatial queries (e.g., using Laravel Scout or PostgreSQL’s geography type). MultiPolygon data benefits from a proper geometry/GeoJSON column and a spatial index.
  • Payload Size: MultiPolygon fields can produce large payloads; validate size limits and consider server-side simplification before persistence.

Failure Modes

Failure Scenario Impact Mitigation
Yandex Maps API downtime Map rendering fails Graceful degradation (static placeholder).
API key revoked/expired All maps break Automated alerts + key rotation process.
High API usage costs Budget overrun Set usage quotas; switch to free tier if needed.
CSS/JS conflicts with other plugins Broken UI Isolate map container; test in isolation.
Slow rendering on low-end devices Poor UX Reduce map height; lazy-load.
Complex MultiPolygon payloads Rendering lag, storage bloat Validate geometry size; simplify polygons; lazy-load.
Missing/regressed translation keys Misleading UI labels Republish translations after upgrades; add UI smoke tests (v5.1.0 fixed one such issue).

Ramp-Up

  • Developer Onboarding:
    • Document the integration steps in the team’s internal wiki.
    • Provide a sandbox Filament app with the package pre-configured.
    • Call out the available geometry modes (Placemark, Polyline, Polygon, MultiPolygon) and their respective DB shapes.
  • Training:
    • Demo for non-technical stakeholders to understand map interactions.
    • Train support teams on common user issues (e.g., "Map not loading").
  • Documentation Gaps:
    • The package still lacks examples for:
      • Custom markers or styling beyond default modes.
      • Integration with Filament actions (e.g., "Show on map").
      • Advanced Yandex Maps features (e.g., routes, clusters, geofencing).
      • MultiPolygon authoring best practices (newly added feature — likely to be documented only in code).
    • Fill these gaps with internal docs or feature requests to the maintainer.
  • Feedback Loop:
    • Collect user feedback on geometry editing UX (especially polygons/multipolygons) and relay to the maintainer; the recent contributor activity suggests this feedback loop can influence the roadmap.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package