Skip to main content

Bias By Postcode

Display address results that closely matches the chosen postcode value.

It will still display unmatched addresses but they will be ranked lower.

The queryOptions object allows customizing the search query. In this example, the bias_postcode property is set to "BR8 7RE" to bias the search results towards the BR8 7RE postcode.

Live Demo (Static Postcode)

Loading...

Dynamically Updating Bias

The example below includes an event listener, which allows users to dynamically change the bias. When the value of the input field changes, setQueryOptions function is used to apply the new bias.

Live Demo (Dynamic Postcode)

Loading...