Requirements

Make sure the user can scroll the map by panning vertically or horizontally (see video)

Make sure the user can zoom in by pinching the screen (see video)

The solution should run on iPhone 6 on iOS 9.

Extra kudos if you make it perform well outside the iOS simulator (e.g. on slower iOS devices).

How to draw the vector data

The JSON file is in the GeoJSON format, it contains data about countries and their geometry. The file for this coding challenge contains arrays of Polygons and MultiPolygons that should be used for drawing. Coordinates of the vector points range roughly from -20.000.000 to +20.000.000, so you may have to rescale the values to fit on screen.

Please don’t use any third-party frameworks or libraries for this that are not available by default on iOS 9.

(Each “feature” represents a country, and the “coordinates” property in the above example shows the list of x and y coordinates of the country’s polygons to be drawn to create the world map. More information about the GeoJSON format and its specification here: http://geojson.org/ )

For this coding challenge, only Polygons and MultiPolygons (which is a collection of Polygons for larger countries) are used.

Further information

It’s best for us if you send your solution as a .zip file with an Xcode project or workspace that we can build right away. You may also put it on your GitHub account and send us a link.

Good luck, and be sure to send us even a partial solution rather than nothing at all! We’ll send back to you a complete solution for the problem in any case.