0

I am trying to add a new property to my countries' GeoJSON.

    var countries = {
    "type": "FeatureCollection",
    "name": "countries",
    "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
    "features": [
    { "type": "Feature", "properties": { "NAME": "Fiji", "POP_EST": 920938 }, "geometry": { "type": "MultiPolygon", "coordinates":
{ "type": "Feature", "properties": { "NAME": "Tanzania", "POP_EST": 53950935 }, "geometry": { "type": "MultiPolygon", "coordinates":
{ "type": "Feature", "properties": { "NAME": "W. Sahara", "POP_EST": 603253 }, "geometry": { "type": "MultiPolygon", "coordinates":

The property would be different for each country, EG 10 cases for Fiji, 20 for Tanzania.

I have tried

countries.properties.Fiji.cases = 10;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.