Forums › Forums › Search & Filter Pro › Google maps integration
- This topic has 1 reply, 2 voices, and was last updated 4 years, 1 month ago by
Trevor.
-
Anonymous(Private) January 10, 2021 at 12:16 pm #272250
Hi Trevor and Ross,
Happy New Year to you both, although not the best of starts, but as long as we end it better than we started it hey! 🙂
In the meantime I just have a quick query for you, we have a site which we use your plugin for searching properties. The properties store the location lat and long values accordingly. I just wondered do you think it would be possible to render a custom google map, as well as the standard property listings, which displayed any entries that have been filtered on? The user could then, within the map functionality itself, filter by postcode/radius etc. Like on here: http://www.nhshealthatwork.co.uk/find-providers.asp?provider-location=w1w+6ub&provider-submit=Search#map_focus
I was thinking of using some replication of https://www.wpgmaps.com/ to create this (as obviously it couldn’t be a map created within there, as we need the pins to be powered by the S&F results…), so something like output an array of coordinates within the S&F code, then from there pop these into a map for output above the listings.
Just thinking though, we’d need to do a custom query within the results code to re-query the properties based on the S&F variables to ensure we output ALL property coordinates, and not just those from say Page 1 of paginated S&F results (which would be the case if we built an array of coordinates directly from the s&f results).
Please could you just let me know your thoughts as to whether you think this is possible/would work? Or, even better, if maybe has someone else done this before to your knowledge so I could maybe take a look at an example, etc.?
Any advice would be greatly appreciated :).
Thanks ever so much as always,
TonyaTrevor(Private) January 11, 2021 at 10:22 am #272301It is, using PHP and a very custom template, possible to render a map of pins, if the map plugin has a mashup type of shortcode feature (which that plugin you mention has in its Pro version I think). You have to run through the while part of the loop fetching the map ID from each post and add that to an output string which is the mashup shortcode, whilst, at the same time in the loop, outputting the posts list into another variable to also be output when finished building.
But, we do not (nor can I see us for some time yet) support geolocation searching (e.g. within 20 miles type of search).
-
AuthorPosts