检查一个地址是否在多个多边形中

时间:2019-05-13 12:58:37

标签: php wordpress google-maps google-maps-api-3

关于this主题,我想在地图上添加多个多边形。我想搜索所有多边形中的位置。我打算在wordpress中使用它。我想为WP Rest API创建自定义端点。它将返回带有区域名称,坐标和其他额外信息(名称,自定义说明等)的json。我的问题是,如何基于json添加多个多边形?

样本json

{
"name": "Area 1",
"description": "Custom description for area 1",
"coordinates": {
    {
        "lat": "41.3749971",
        "lng": "2.1669979"
    },
    {
        "lat": "41.3749569",
        "lng": "2.1683179"
    },
  }
},
{
"name": "Area 2",
"description": "Custom description for area 2",
"coordinates": {
    {
        "lat": "41.3749971",
        "lng": "2.1669979"
    },
    {
        "lat": "41.3749569",
        "lng": "2.1683179"
    },
  }
}

0 个答案:

没有答案
相关问题