API Map Integration

To create UK Maps of the data from the Governments Petition Data

As data is becoming more and more available in the JSON format, and WordPress core functionality and addons marches forwards, I wanted to show how WordPress can be used to implement the display of that information

WordPress JSON Map Example

The Approach

Researched several approaches which included

obtaining a mapping and chart library which could be used in WordPress.
deciphering the JSON data
obtaining a GeoJson Map of England

For this particular implementation we didn’t want to hold the data in the database. We do a call each time the user selects a different petition

The Outcome

We have a page where the user can select a UK government petition from a dropdown list. The map includes a legend – colour codes different signing levels.