May 2019
Beginner to intermediate
650 pages
14h 50m
English
In this section, you will learn how to load a JSON file that contains geographical data and use it to draw SVG polygons. We will use the Data/world-lowres.geojson file (from the repository for this chapter). This is a fragment of this file:
{"type":"FeatureCollection","features":[ { "type":"Feature", "id":"AFG", "properties":{"name":"Afghanistan"}, "geometry":{ "type":"Polygon", "coordinates":[[[61.210,35.650],[62.230,35.270], … ,[61.210,35.650]]] } },{ "type":"Feature", "id":"AGO", "properties":{"name":"Angola"}, "geometry":{ "type":"MultiPolygon", "coordinates":[[[[16.326,-5.877],[16.573,-6.622],…,[12.436,-5.684]]]] } }, ...]}
This file contains an array with all countries in the features property. That ...
Read now
Unlock full access