Fix city/zip filtering and improve map hover behavior
MLS Query Changes: - Use exact city/postal_code matching instead of radius search - Fixes city filter returning 1700+ results instead of 97 for Ramsey Cluster Endpoint: - Parse "City, SS" format to extract city name before querying - Fixes pins not showing when city filter applied Property Filters JS: - Always fit map bounds when filter changes (not just on no intersection) - Fit bounds on initial page load when URL has filters - Show temporary hover pin when marker is clustered or outside viewport - Uses markerCluster.getVisibleParent() to detect clustered markers Property Results: - Add zip code parameter handling for URL filters 🤖 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
+4
@@ -256,6 +256,10 @@ final class MLS_Plugin {
|
||||
$status = isset($_REQUEST['status']) ? sanitize_text_field($_REQUEST['status']) : 'Active';
|
||||
$property_type = isset($_REQUEST['property_type']) ? sanitize_text_field($_REQUEST['property_type']) : null;
|
||||
$city = isset($_REQUEST['city']) ? sanitize_text_field($_REQUEST['city']) : null;
|
||||
// Parse "City, SS" format - extract just the city name
|
||||
if ($city && preg_match('/^(.+),\s*([A-Z]{2})$/', $city, $matches)) {
|
||||
$city = $matches[1];
|
||||
}
|
||||
$min_price = isset($_REQUEST['min_price']) ? (int) $_REQUEST['min_price'] : null;
|
||||
$max_price = isset($_REQUEST['max_price']) ? (int) $_REQUEST['max_price'] : null;
|
||||
$min_beds = isset($_REQUEST['min_beds']) ? (int) $_REQUEST['min_beds'] : null;
|
||||
|
||||
Reference in New Issue
Block a user