how to know whether a point is on land or water using google maps api -
i want know whether point on land or water using google maps geocoding api.
if give coordinate point (40,-74) on water body, still getting address shown below.
the address is:1416 highland ave, cinnaminson, nj 08077, usa results[0].geometry.locationtype:rooftop results[0].types[0].tostring():street_address(which has "natural_feature")
i using java client library this. me because have strucked here , has submit assignment soon. in advance.
you can filter results of reverse geocoding result type , location type. in result type can natural_feature , location type should geometric_center or approximate exclude rooftop address can close given point on land.
please have @ following request:
the first 2 items in response are:
- north atlantic ocean (type: natural_feature, place id: chijeq3jdsmo3qorbgvpwfckzuq)
- atlantic ocean (type: natural_feature, place id: chij_7hu48qbwgyrt1mq81cinky)
now if execute same request point on land:
the first result 'drum point rd, brick, nj 08723, usa' of type route.
hope helps.
Comments
Post a Comment