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

Welcome to AfriGIS

The AfriGIS Libraries are the easiest way for developers to implement AfriGIS components and to consume AfriGIS web services such as Search and Reverse Geocode.

Jump to:

 

AfriGIS Services Library

The AfriGIS Services Library provides you with simplified access to the most commonly used AfriGIS web services such as Autocomplete, Geocode and Reverse Geocode.  More services will be added in the future.

The library will take care of all authentication issues as well as building up the request parameters and encoding them where necessary.  Intelligent code completion (for example IntelliSense) in the library will help you access the useful methods and properties to code productively.

Access to the web services is secured and you will need to sign up for a free trial account to obtain a key and secret here: https://saasregistration.afrigis.co.za/

Web services available:

  • Geocode Address
  • Geocode Details
  • Reverse Geocode
  • Get Token
  • Get Credit Balance

The library is currently available for the Java and .NET platforms.

 

DOWNLOAD AND INSTALL THE LIBRARY

Java

Platform Description Download library and dependencies
Java 7+ Library to integrate with the AfriGIS Services. Download

Steps:

  • Download the zip file
  • Extract into a lib folder in your project folder
  • Add the JAR files to your project’s classpath, using the method appropriate to your IDE

.NET

 

The libraries are available from the NuGet.org repository. For more information on how to get started with NuGet in .NET, please refer to the NuGet Overview.

 

Library Description NuGet Page
AfriGIS.Services.Geocode Library to integrate with the AfriGIS Geocode Service. Details
AfriGIS.Services.ReverseGeocode Library to integrate with the AfriGIS Reverse geocode service. Details
AfriGIS.Services

(installed automatically with either of the above)

Core library to integrate with AfriGIS Services, including getToken and getCredits. Details

The .NET version of the AfriGIS Services Library requires a minimum .NET version of 4.5.

 

QUICK START CODE SAMPLE

Below is an example which creates a new Service Call factory with your key and secret.  A new Geocode Address request is created to search for the address “Hatfield, Pretoria” and the Geometry option is added.  A synchronous request is made and then each matching address in the response is output, along with its coordinates.

JAVA

Click to expand code sample:

.NET

Click to expand code sample:

 

ERROR HANDLING

Whenever the library encounters an error, it throws a single exception which contains details of the error condition.  It is also possible for modules that the library depends upon to throw exceptions. Some of these are also listed below.

JAVA

.NET

 

SUPPORT

If you need further assistance with implementing the AfriGIS Services Library, please email support@afrigis.co.za.

 

JavaScript API Library

The AfriGIS JavaScriptAPI enables users to embed a fully functional map into any web page. It provides functionality to control and add customer data to the map. It is written in pure JavaScript, HTML and CSS, meaning no third party plug-in is required. The API supports the most popular browsers, including: Mozilla Firefox, Google Chrome, Opera and Internet Explorer.

Link: https://developers.afrigis.co.za/portfolio/javascript-api/

 

Map SDK Library

The AfriGIS MapSDKs enables users to build interactive maps into their mobile applications. The SDKs also provides 3D voice-enabled turn-by-turn navigation functionality. The latest version also boasts real-time traffic, in proud partnership with Altech Netstar.

Link: https://developers.afrigis.co.za/portfolio/map-sdk/