Focus searches on your service area

How to make your search area more precise

Matt Ramsay
AddressFinder
3 min readSep 10, 2018

--

Want customers to look up addresses within a certain area to fit with your delivery boundaries? Learn how to refine the search options.

Do you deliver to a certain area? Photo cred: Leonie Wise

By default AddressFinder offers all the addresses for Australia and New Zealand. But some users want to make a search area more precise.

You can refine addresses to any defined area such as an island, state, city, town, suburb, post code or an area you choose.

Why refine the address area?

There are a variety or reasons people want to define the address area. Here are just a few:

  • Shipping restrictions (eg. between islands)
  • Legal practicing boundaries (eg. states or city/town)
  • Delivery limitations (eg. hot food or perishable goods)

Sounds great, tell me more

Firstly, what area do you want to restrict?

There are different methods of restricting address searches. Some are set up by using the filters available. For other methods you add custom JavaScript designed to modify the widget behaviour.

How to:

Restrict by State (AUS) or Region (NZ)

Simply make use of the filters when generating the JavaScript code for the widget. You can restrict to one or more states or regions. Here’s how:

Restrict by Island (NZ only)

This is a postcode-based restriction. Postcodes in NZ range from 0000 to 9999. North Island postcodes range from 0000 to 6999. South Island postcodes range from 7000 to 9999.

Add some JavaScript to the code for the AddressFinder widget to allow the postcode of the selected address to be checked. This check will determine if the selected address lies within the boundaries of the approved island. If it does, the selected address can be collected. If it does not then the address will not be returned and instead the customer will receive a message.

Restrict by Town or City (NZ only)

Similar to the above, this is enabled with the addition of some custom JavaScript however instead of the post code being checked, it is the Town or City field that is checked. You may include more than one approved town or city if needed. Here’s how that works:

Restrict to part of a Town/City (AU & NZ)

In this scenario the post code of the selected address is checked against a number of ‘approved’ postcodes. These approved post codes will be chosen by you because of their association with your service area.

Restrict to a suburb or locality (AU & NZ)

In this scenario the suburb or locality of the selected address is checked against your approved suburb or locality.

Restrict by a unique area set using coordinates (AU & NZ)

Are you wanting to collect addresses from a specific area which is not associated with a postcode or suburb? You can define this area using a set of GPS coordinates.

Firstly, get the geofence coordinates that define your area. A few online tools do this like: http://www.birdtheme.org/useful/v3tool.html.

East of Wellington Airport

The next step is to add some JavaScript to the AddressFinder widget. This checks if the GPS coordinates associated with the selected address lay within the area previously defined. If they do you will collect that address. If not the user will receive a message.

In short

AddressFinder is versatile. You can use it to control parameters associated with your organisation.

If you have a need, even if it’s not mentioned here, please get in touch. We enjoy a challenge and we’d love to hear from you!

--

--