如何在 GitHub 的 markdown 中嵌入 GeoJSON?

How can I embed GeoJSON in markdown on GitHub?

他们在 docs.github.com 的玩具示例已损坏:

{
  "type": "Polygon",
  "coordinates": [
      [
          [-90,30],
          [-90,35],
          [-90,35],
          [-85,35],
          [-85,30]
      ]
  ]
}

它没有像承诺的那样呈现,甚至没有通过 linter

我创建了一个较小的 reprex 来表明修复 linter 问题并不能使其正常工作。 GitHub 然后抱怨“我们无法渲染带有空的未知集合的地图。”修复它似乎也无济于事。但也许我犯了一个错误。

我做错了什么?

已解决:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": 1,
      "properties": {
        "ID": 0
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
              [-90,35],
              [-90,30],
              [-85,30],
              [-85,35],
              [-90,35]
          ]
        ]
      }
    }
  ]
}