Switch to 100% server-side map clustering
Removes client-side Leaflet MarkerCluster library in favor of server-side clustering at all zoom levels: - Zoom 1-8: Density dots - Zoom 9-15: Server-generated numbered clusters - Zoom 16+: Individual property markers This prevents the visual issue where server-returned clusters were being re-clustered by the client into a single merged marker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Regular → Executable
+2
-5
@@ -336,15 +336,12 @@ class MLS_Cluster {
|
||||
return $this->get_density_data($where_sql, $values, $zoom, $center_lat, $total, self::DENSITY_DOT_SPACING);
|
||||
}
|
||||
|
||||
// Zoom 12-15: Numbered clusters (or individual if low count)
|
||||
// Zoom 9-15: Always use server-side clusters (let server handle grouping)
|
||||
if ($zoom <= self::ZOOM_CLUSTER_MAX) {
|
||||
if ($total <= self::MAX_INDIVIDUAL_MARKERS) {
|
||||
return $this->get_individual_markers($where_sql, $values, $total);
|
||||
}
|
||||
return $this->get_cluster_data($where_sql, $values, $zoom, $center_lat, $total);
|
||||
}
|
||||
|
||||
// Zoom 16+: Individual markers
|
||||
// Zoom 16+: Individual markers (no clustering needed at this zoom)
|
||||
return $this->get_individual_markers($where_sql, $values, $total);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user