[sr_map_search]
– Interactive map search
The [sr_map_search]
short-code shows an interactive map search on your website to help your users search for listings visually with tools for searching within custom polygons and fine-tuning criteria.
By default, the short-code will render a map with the first 25 results that match the filters on the short-code (or the default). The user can paginate to the next or previous page of results, search within custom areas on the map, and modify the search criteria. Add filters to change the default search query and use options to change the behavior of the short-code.
Sections
Syntax
Basic syntax
[sr_map_search]
With options and filters
[sr_map_search search_form="true" grid_view="true"]
Options
This short-code supports options to change the output and behavior of the interactive map search. See the syntax section for an example of how to use the options.
Name | Default | Description | Example |
search_form | false | Show a search form above the map. | [sr_map_search search_form="true"] |
grid_view | false | Show a grid view of search results below the map. | [sr_map_search grid_view="true"] |
list_view | false | Show a list of search results below the map. | [sr_map_search list_view="true"] |
Search filters
Adding search filters let’s you control which listings are queried and shown on the map. If no search filters are used, the default search filters are used.
When the search_form
option is enabled, the user can specify their own search filters for some options, like minprice
. This means that if you set a default minbeds
, that can be changed by the user. However, the user cannot change options that are not visible in the search form, like agent
and brokers
.
Name | Default | Multiple | Description | Example |
vendor | null | false | The RETS vendor to search (required with multi-mls accounts). | vendor="har" |
sort | Modifed, descending | false | Sort the listings on list date, price , number of bedrooms, or number of bathrooms. | sort="-listdate" |
limit | 25 | false | The number of results to show per page (max 500). | limit="500" |
q | null | true | A textual keyword search that searches MLS #, street address, city, zip code, subdivision, and MLS area. | q="Houston" |
status | Active; Pending | true | Filter listings by status. | status="Active; Closed" |
type | Residential; Rental | true | Filter listings by property type. | type="Condominium; Rental" |
subtype | Townhouse; Condominium | true | Filter listings by property sub-type. | subtype="Townhouse; Condominium" |
agent | null | true | Filter listings by agent MLS ID(s). | agent="agent1; agent2" |
brokers | null | true | Filter listings by broker MLS ID(s). | brokers="office1; office2" |
salesAgent | null | false | Filter listings by a sales agent MLS #. | salesAgent="AGENTID" |
minprice | null | false | Filter listings by a minimum price. | minprice="500000" |
maxprice | null | false | Filter listings by a maximum price. | maxprice="1000000" |
minarea | null | false | Filter listings by a minimum living area. | minarea=2500 |
maxarea | null | false | Filter listings by a maximum area. | maxarea=10000 |
minbeds | null | false | Filter listings by a minimum number of bedrooms. | minbeds="3" |
maxbeds | null | false | Filter listings a maximum number of bedrooms. | maxbeds="5" |
minbaths | null | false | Filter listings by a minimum number of bathrooms. | minbaths="2" |
maxbaths | null | false | Filter listings by a maximum number of bathroroms. | maxbaths="5" |
maxdom | null | false | Filter listings by a maximum days on market. | maxdom="30" |
minyear | null | false | Filter listings by a minimum year built. | minyear="2015" |
maxyear | null | Filter listings by a maximum year built. | maxyear="1984" | |
minacres | null | false | Filter listings by a minimum number of acres. | minacres="5" |
maxacres | null | false | Filter listings by a maximum number of acres. | maxacres="100" |
minGarageSpaces | null | false | Filter listings by a minimum number of garage spaces. | minGarageSpaces="2" |
maxGarageSpaces | null | false | Filter listings by a maximum number of garage spaces. | maxGarageSpaces="4" |
water | null | false | Filter listings by a waterfront (or “true” for all waterfront listings). | water="Lake Name" |
cities | null | true | Filter listings by a city. | cities="Houston; Chicago" |
state | null | true | Filter listings by a state. | state=" TX" |
postalCodes | null | true | Filter listings by a postal code. | postalCodes="77001; 77002" |
neighborhoods | null | true | Filter listings by a neighborhood. | neighborhoods="Oak Ridge; River Oaks" |
counties | null | true | Filter listings by a county. | counties="Montgomery; Harris" |
features | null | true | Filter listings by interior features. | features="Wet Bar; High Ceiling" |
exteriorFeatures | null | true | Filter listings by exterior features | exteriorFeatures="Patio; Outhouse" |
idx | null | false | Specify the IDX display requirements for the listings.idx=null (default)– IDX address display must be true – IDX listing display must be true idx=listing – IDX address display is ignored – IDX listing display must be true idx=address – IDX address display must be true – IDX listing display is ignored idx=ignore – IDX address display is ignored – IDX listing display is ignored Please check with your MLS or data feed provider on the rules and requirements for displaying restricted listings. | idx="listing" |
Check out the API docs here for more information and examples of the search parameters, and possible values for things like type
and subtype
.
Example
Short-code:
[sr_map_search search_form="true" grid_view="true"]
Output: