propertyhive / WP-Property-Hive

The complete estate agency software plugin for WordPress
Other
25 stars 25 forks source link

Limit properties in the map based on search results #191

Closed Ecostack closed 2 months ago

Ecostack commented 2 years ago

It looks like the map always displays all available properties, ignoring the search results displayed below. Is it possible to align the results displayed on the map based on the found search result?

propertyhive commented 2 years ago

@Ecostack Can you confirm if you're using a separate [property_map_search] shortcode, or are you using the 'Display the map and standard results side-by-side' option under 'Property Hive > Settings > Map Search'?

If the former, then yes that would just output all available properties and not take the filters into account (though I agree it probably should). We've just never seen it done in this way so is a new one on me.

Do let me know,

Thanks, Steve

Ecostack commented 2 years ago

@propertyhive Hey Steve, thanks for your response! The map is displayed as a banner and the Honeycomb theme is used. As for the mentioned setting, this is the current chosen option "Neither. I don't want map search shown on the search results". Upon some tests, it seems like the filtering does limit the properties on the banner map on the first or second try. Afterwards, it seems to stop. Tried that also in the private mode, seems to help on the first try but it feels a bit unstable and the results are not really reproducible.

WebblaJordan commented 3 months ago

@Ecostack Can you confirm if you're using a separate [property_map_search] shortcode, or are you using the 'Display the map and standard results side-by-side' option under 'Property Hive > Settings > Map Search'?

If the former, then yes that would just output all available properties and not take the filters into account (though I agree it probably should). We've just never seen it done in this way so is a new one on me.

Do let me know,

Thanks, Steve

@propertyhive

Hi Steve,

I'm facing this issue using the [property_map_search] shortcode. I'm using elementor to build the search results page and want to include the results map alongside Elementor Loop. Is there a good way to pull the built-in half map as a shortcode so the pins correlate to the current query instead of all properties?

Thanks

propertyhive commented 2 months ago

We spoke about this via email but for the purposes of this ticket, we managed to solve this by creating a custom shortcode:

https://gist.github.com/propertyhive/c52e69034f4ffff563a6f1e60eb194f5

Then use the shortcode [propertyhive_map_search_custom]