Verify if a point is Land or Water in Google Maps

后端 未结 18 1838
不知归路
不知归路 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条回答
  •  旧时难觅i
    2020-11-22 18:07

    If List

    address returns 0 , you can assume this location as ocean or Natural Resources.Just add Below Code in Your response Method of Google Places API Response.

    Initialize Below List as mentioned

    List

    addresses = geocoder.getFromLocation(latLng.latitude, latLng.longitude, 1);

    if (addresses.size()==0) { Toast.MakeText(getApplicationContext,"Ocean or Natural Resources selected",Toast.LENGTH_SHORT).show(); }else{ }

提交回复
热议问题