Skip to content

Conversation

@andrewlimaza
Copy link
Collaborator

@andrewlimaza andrewlimaza commented Oct 30, 2025

  • ENHANCEMENT: Added marker clustering functionality. Groups 2+ markers for Google Maps when zoomed out. Uses default clustering logic.

Examples:
Screenshot 2025-10-30 at 12 31 14

Screenshot 2025-10-30 at 12 31 00

Resolves: #216

All Submissions:

* ENHANCEMENT: Added marker clustering functionality. Groups 2+ markers for Google Maps when zoomed out. Uses default clustering logic.
@andrewlimaza andrewlimaza requested a review from Copilot October 30, 2025 11:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds marker clustering functionality to Google Maps integration, allowing multiple markers that are close together to be grouped into clusters at specific zoom levels. The implementation includes the MarkerClusterer library and provides a filter to enable/disable the feature.

Key changes:

  • Added MarkerClusterer library (minified JavaScript file)
  • Modified marker handling to support clustering via an array
  • Added PHP filter pmpromd_map_cluster_markers to control clustering behavior
  • Included cluster marker images (m1.png through m5.png)

Reviewed Changes

Copilot reviewed 2 out of 8 changed files in this pull request and generated 3 comments.

File Description
includes/google-maps/js/marker-cluster.min.js Added MarkerClusterer library for clustering functionality
includes/google-maps/js/map.js Modified to store markers in array and conditionally apply clustering
includes/google-maps/includes/functions.php Added clustering filter, script enqueuing, and dependency management
includes/google-maps/images/m1.png - m5.png Added cluster marker images for different cluster sizes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add marker clustering for Google Maps

1 participant