+27 87 310 6400 | products@afrigis.co.za
bclose

Dropdown Search

Get lists of Suburbs in Towns and Towns in Provinces in a hierarchal way.

DropDownSearch_2
The Dropdown Search API allows users to search AfriGIS datasets in the traditional “drill down” way, starting with provinces, then towns and finally suburbs.

See also:

API DOCUMENTATION

1. Overview

2. aghs.getProvinces

3. aghs.getTowns

4. aghs.getSurburbs

1. Overview

There are three types of requests that can be made on the AfriGIS Dropdown Search service. These are provinces, towns and suburbs layers. The AfriGIS Dropdown Search returns a JSON object.

2. aghs.getProvinces

aghs.getProvinces returns a list of South African provinces as a JSON object. It takes no input parameters. The result is returned in a JSON object.

Sample Request:

https://saas.afrigis.co.za/rest/2/aghs.getProvinces/[AUTHENTICATION_PARAMETERS]/?request=aghs.getProvinces
Visit Authentication page to see how to calculate [AUTHENTICATION_PARAMETERS]

Sample Response:

Response Description:

PROVINCE – The name of the province.
AG_PROV_ID – The ID assigned to the province in the database.
CENTROIDX – The longitude of the centre of the province in decimal degrees.
CENTROIDY – The latitude of the centre of the province in decimal degrees.

3. aghs.getTowns

NB: Please note that this service is not available to Trial users. Please contact AfriGIS to sign up for this service.
aghs.getTowns returns a list of towns from the specified South African province as a JSON object. The AG_PROV_ID must be provided to specify the province to get the towns for.

Sample Request:

https://saas.afrigis.co.za/rest/2/aghs.getTown/[AUTHENTICATION_PARAMETERS]/?request=aghs.getTowns&ag_prov_id=1
Visit Authentication page to see how to calculate [AUTHENTICATION_PARAMETERS]

Sample Response:

Response Description:

TOWN – The name of the town.
AG_TOWN_ID – The ID assigned to the town in the database.
CENTROIDX – The longitude of the centre of the town in decimal degrees.
CENTROIDY – The latitude of the centre of the town in decimal degrees.

4. aghs.getSuburbs

NB: Please note that this service is not available to Trial users. Please contact AfriGIS to sign up for this service.
aghs.getSuburbs returns a list of suburbs from the specified South African town as a JSON object.  The AG_TOWN_ID must be provided to specify the town to get the suburbs for.

Sample Request

https://saas.afrigis.co.za/rest/2/aghs.getSuburbs/[AUTHENTICATION_PARAMETERS]/?request=aghs.getSuburbs&ag_town_id=5
Visit Authentication page to see how to calculate [AUTHENTICATION_PARAMETERS]

Sample Response

Response Description:

SUBURB – The name of the suburb.
AG_SUB_ID – The ID assigned to the suburb in the database.
CENTROIDX – The longitude of the centre of the suburb in decimal degrees.
CENTROIDY – The latitude of the centre of the suburb in decimal degrees.

Project Details