获取Google地图中特定区域的所有用户姓名或用户总数


Get all the user's name or total number of user in particular area in Google map

我有一个用户及其详细信息的列表,存储在具有纬度和经度的数据库中。我需要查询,

当任何单个用户想要在谷歌地图上显示离他位置最近200米内可用的用户数量时。

请告诉我如何获得特定区域的所有用户名或用户总数。

我使用这个查询从lat long获取半径。

SELECT
    *,
    ( 6371 * acos( cos( radians({$lat}) ) * cos( radians( `lat` ) ) * cos( radians( `lng` ) - radians({$lng}) ) + sin( radians({$lat}) ) * sin( radians( `lat` ) ) ) ) AS distance
FROM `positions`
HAVING distance <= {$radius}
ORDER BY distance ASC

6371为地球半径m km。