diff --git a/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php b/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php
index 127d00e2..aa720fd5 100644
--- a/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php
+++ b/wp-content/plugins/mls-by-hansonxyz/includes/class-mls-cluster.php
@@ -28,6 +28,11 @@ class MLS_Cluster {
*/
const DENSITY_DOT_SPACING = 40;
+ /**
+ * Denser spacing for very zoomed out views (40% more dense = 60% of normal)
+ */
+ const DENSITY_DOT_SPACING_DENSE = 24;
+
/**
* Maximum properties to return as individual markers
* Above this threshold, return clusters
@@ -37,8 +42,8 @@ class MLS_Cluster {
/**
* Zoom thresholds for visualization modes
*/
- const ZOOM_HEATMAP_MAX = 7; // 3-7: heatmap only
- const ZOOM_DENSITY_MAX = 11; // 8-11: density dots
+ const ZOOM_DENSE_MAX = 5; // 1-5: density dots (40% more dense)
+ const ZOOM_DENSITY_MAX = 11; // 6-11: density dots (normal)
const ZOOM_CLUSTER_MAX = 15; // 12-15: numbered clusters
// 16+: individual markers
@@ -274,14 +279,14 @@ class MLS_Cluster {
$zoom = (int) $args['zoom'];
// Determine visualization mode based on zoom level
- // Zoom 3-7: Heatmap (just return points for client-side heatmap)
- if ($zoom <= self::ZOOM_HEATMAP_MAX) {
- return $this->get_heatmap_data($where_sql, $values, $total);
+ // Zoom 1-5: Density dots (40% more dense)
+ if ($zoom <= self::ZOOM_DENSE_MAX) {
+ return $this->get_density_data($where_sql, $values, $zoom, $center_lat, $total, self::DENSITY_DOT_SPACING_DENSE);
}
- // Zoom 8-11: Density dots (small colored circles without numbers)
+ // Zoom 6-11: Density dots (normal spacing)
if ($zoom <= self::ZOOM_DENSITY_MAX) {
- return $this->get_density_data($where_sql, $values, $zoom, $center_lat, $total);
+ 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)
@@ -347,15 +352,17 @@ class MLS_Cluster {
* @param int $zoom Map zoom level
* @param float $center_lat Center latitude for Mercator adjustment
* @param int $total Total count
+ * @param int $pixel_spacing Pixel spacing for grid cells
* @return array
*/
- private function get_density_data($where_sql, $values, $zoom, $center_lat, $total) {
+ private function get_density_data($where_sql, $values, $zoom, $center_lat, $total, $pixel_spacing = null) {
global $wpdb;
$table = $this->db->properties_table();
+ $pixel_spacing = $pixel_spacing ?: self::DENSITY_DOT_SPACING;
// Use smaller grid cells for density dots
- list($lat_step, $lng_step) = $this->get_grid_step_for_zoom($zoom, $center_lat, self::DENSITY_DOT_SPACING);
+ list($lat_step, $lng_step) = $this->get_grid_step_for_zoom($zoom, $center_lat, $pixel_spacing);
$sql = "SELECT
FLOOR(latitude / %f) as lat_cell,
diff --git a/wp-content/themes/homeproz/archive-property.php b/wp-content/themes/homeproz/archive-property.php
index 578fe4fd..19c33ed3 100755
--- a/wp-content/themes/homeproz/archive-property.php
+++ b/wp-content/themes/homeproz/archive-property.php
@@ -131,8 +131,6 @@ if (function_exists('mls_get_property_count')) {
-
-