Verify if a point is Land or Water in Google Maps

后端 未结 18 1862
不知归路
不知归路 2020-11-22 17:16

..and then Google-maps \"divide the waters from the waters\"

Well, not in the biblical sense but..

I would like to know what options I have in order to verif

18条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 17:54

    There is a free web API that solves exactly this problem called onwater.io. It isn't something built into Google maps, but given a latitude and longitude it will accurately return true or false via a get request.

    Example on water: https://api.onwater.io/api/v1/results/23.92323,-66.3

    {
      lat: 23.92323,
      lon: -66.3,
      water: true
    }
    

    Example on land: https://api.onwater.io/api/v1/results/42.35,-71.1

    {
      lat: 42.35,
      lon: -71.1,
      water: false
    }
    

    Full disclosure I work at Dockwa.com, the company behind onwater. We built onwater to solve this problem ourselves and help the community. It is free to use (paid for high volume) and we wanted to share :)

提交回复
热议问题