Commit Graph

8 Commits

Author SHA1 Message Date
Hanson.xyz Dev eed01f2e04 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>
2025-12-29 03:16:16 -06:00
Hanson.xyz Dev dfad0f57e6 Add hover pins for clustered properties, disable grouping under 30 markers
- Add data-lat/data-lng attributes to MLS property cards
- Create temporary highlighted pin on card hover when marker is clustered
- Show individual pins (no grouping) when <= 30 properties in viewport
- Add markerLayer for unclustered markers to bypass client-side clustering
- Show loading spinner immediately on map move to abort image loads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-17 02:31:23 -06:00
Hanson.xyz Dev acd606bb03 Sync property list with map viewport
Major changes:
- Property list now updates when map pans/zooms
- Properties sorted by distance from map center (closest first)
- Shows "X properties in view" when viewport filtering active
- Min 30 properties required before grouping kicks in
- Added rule to CLAUDE.md: no commits unless asked

Backend:
- MLS_Query: Added bounds filtering and distance-based sorting
- AJAX handler: Accepts bounds/center, sorts by distance when provided

Frontend:
- Map move triggers property list refresh with same viewport
- Loop prevention flag to avoid map->filter->map recursion
- Resets to page 1 when viewport changes

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 01:27:44 -06:00
Hanson.xyz Dev 9337a3cbc7 Start numbered clusters at zoom 9 instead of 12
- Zoom 1-5: Dense density dots
- Zoom 6-8: Normal density dots
- Zoom 9-15: Numbered clusters
- Zoom 16+: Individual markers

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 01:07:26 -06:00
Hanson.xyz Dev 7c3c322449 Replace heatmap with density dots for all zoom levels
Remove Leaflet.heat in favor of consistent density dot visualization:
- Zoom 1-5: Density dots with 40% more density (24px spacing)
- Zoom 6-11: Density dots with normal spacing (40px)
- Zoom 12-15: Numbered cluster circles
- Zoom 16+: Individual property markers

Density dots provide clearer visualization than heatmap blobs for
high-density property data.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:58:59 -06:00
Hanson.xyz Dev 93d5b01111 Add tiered map visualization based on zoom level
- Zoom 3-7: Heatmap overlay showing property density
- Zoom 8-11: Density dots (small colored circles without numbers)
- Zoom 12-15: Numbered cluster circles
- Zoom 16+: Individual property markers

Backend returns different data types (heatmap/density/clusters/markers)
based on zoom level. Frontend uses Leaflet.heat for heatmap and custom
divIcons for density dots with color gradient based on count.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:53:21 -06:00
Hanson.xyz Dev 1c728ec60e Fix clustering density with pixel-based grid calculation
Replace geohash precision mapping with dynamic grid sizing based on
target pixel spacing (60px between cluster centers). Uses Leaflet/OSM
tile math to calculate degrees-per-pixel at each zoom level, adjusted
for Mercator projection at the viewport's center latitude.

At zoom 7, this gives ~52km cells and ~150 clusters statewide,
properly separating Minneapolis from St. Cloud.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:31:11 -06:00
Hanson.xyz Dev 1862cef42a Add server-side clustering for map with 30k+ properties
- Remove 1000 property limit from count display
- Add MLS_Cluster class for geohash-based server-side clustering
- Add AJAX endpoint for dynamic cluster loading based on viewport/zoom
- Update property-results.php and ajax-handlers.php to use efficient counting
- Update map JavaScript to fetch clusters dynamically as user pans/zooms
- Server returns clusters at low zoom, individual markers at high zoom
- Fixes property count showing 1000 instead of actual ~30k properties

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-16 00:04:22 -06:00