Hey Antonio,
What I’m thinking of doing is this:
* On page load, spit out any needed html for the map, then by default load all properties onto the map via AJAX
* The function called by AJAX would first check for the featured properties stored in a 1 hour or so transient, and if not there, or if transient is expired, grab the featured properties from the API
* Then above or overlaid on the map I’ll have some basic filtering form elements, like price, bedrooms, etc. Once they click submit button, it’ll call that same AJAX function, passing in those form field values as parameters so it can filter out only the properties it needs, and then refresh the map with the results.
So it wouldn’t work exactly like your repo, just be inspired by it 🙂 Plus I’ve only ever used Google Maps for stuff like this, but I might try Leaflet, based on some of your code.
(
0 rating, 0 votes, rated)
You need to be a registered member to rate this post.Loading...