确定坐标是否在 Google 地图范围内?

Tru*_*an1 2 google-maps coordinates google-maps-api-3

我有一张已经缩放和定位的谷歌地图。如何确定某些坐标是否在当前地图的地图边界或视口内?仅当我提供的坐标位于当前范围内时,我才想有条件地删除引脚。

geo*_*zip 5

google.maps.LatLngBounds.contains()

(来自文档):

contains
contains(latLng)
参数:
latLng:LatLng|LatLngLiteral
返回值: boolean
如果给定的 lat/lng 在此范围内,则返回 true。