Google Map v2检查该点是否包含在区域中 [英] Google Map v2 check whether the point contains in area

查看:94
本文介绍了Google Map v2检查该点是否包含在区域中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部.我正在尝试检查用户在Google地图上点击的点是否在特定区域内,Google Map api v2是否有我可以快速使用的任何方法?

all. I am trying to check the point that user taps on the google map whether in specific area, does google map api v2 have any method that i can quick to use?

推荐答案

您可以使用 https://stackoverflow.com/a/14700745/759007 .

You can use LatLngBounds. It has contains method which returns true when given LatLng is inside bounds. If you want to get current visible region I recommend reading: https://stackoverflow.com/a/14700745/759007 .

这篇关于Google Map v2检查该点是否包含在区域中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆