Build with IDX Broker Forums API Featured Listings On a Custom Map

Viewing 3 reply threads
  • Author
    Posts
    • Richard Buff
      Participant
      Post count: 3

      So for an upcoming project, the client wants a custom map of the featured properties only. Typical map stuff, each listing will be a marker, with an infowindow popup with thumbnail, address, price, etc… and a View Details link. In this case the View Details link is going to go to a WordPress CPT, but that should be irrelevant to my question I think.

      So I’m wanting to pull featured listings from the API, iterate over them, and plop them on a map. It would also be nice if there were filtering options, so they could update the map based on price selected, # bedrooms, # baths, etc…

      I’m capable of coding this myself, but I certainly wouldn’t want to re-invent the wheel if there is some code for this laying around somewhere that I haven’t found yet, and that someone would like to share with me. (Iwould be using jQuery and PHP in WordPress)

      Antonio has a nice start here https://github.com/antonioortegajr/IDX-Broker-Map-Example . I can use this as a guide and build a form for it that would update the markers as the user changed the price, etc… But curious if there is already something like this in existence?

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
    • Richard Buff
      Participant
      Post count: 3

      For anyone reading this, I also posted this on the IDX Broker Mastermind Facebook group (figured some developers might be here, and some might be there) https://www.facebook.com/groups/idxbrokermastermindgroup/permalink/954365801307970/

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
    • idxbroker
      Keymaster
      Post count: 179

      Glad you like the repo! I assume you were going to filter in the PHP script? OR were you thinking of filtering in the JS client side to make this more flexible?

      0 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
    • Richard Buff
      Participant
      Post count: 3

      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 ratings, 0 votes0 ratings, 0 votes (0 rating, 0 votes, rated)
      You need to be a registered member to rate this post.
      Loading...
Viewing 3 reply threads
  • You must be logged in to reply to this topic.