I'm working with Android Google Maps API v2. Is it possible to check if point (LatLng) is in water or land?
Asked
Active
Viewed 1,321 times
3
-
Maps V2 has no means of telling you if a point is over land or water. Whether there is some other Google API that could do this, I cannot say. – CommonsWare Jan 20 '15 at 14:13
-
checkout this answer: http://stackoverflow.com/a/3645696/1484779 – jlopez Jan 20 '15 at 14:16
1 Answers
2
No, there is no direct API for this AFAIK.
Another SO answer pointed out two possible workarounds:
- You can use Google Maps Reverse Geocoding . In result set you can determine whether it is water by checking types. In waters case the type is natural_feature. See more at this link http://code.google.com/apis/maps/documentation/geocoding/#Types.
- You can detect waters/lands by pixels, by using Google Static Maps. But for this purpose you need to create http service.
shkschneider
- 17,185
- 13
- 56
- 110