// 距离推荐算法:(p[i].x-localLng)^2+(p[i].y-localLat)^2<=r^2
function rangeDis(pointX, pointY, rr) {
// 定位坐标
var localL = [];
var localL = localStorage.getItem("local");
if (localL == null) {
localL = "108.173169,26.494508"
}
var localL = localL.split(',')
var localLng = localL[0];
var localLat = localL[1];
// 商家坐标
var pointLng = pointX
var pointLat = pointY
var pLocal = [localLng, localLat];
var pPoint = [pointLng, pointLat];
var dis = AMap.GeometryUtil.distance(pLocal, pPoint);
var rr = rr
if (dis < rr) {
var point = [pointLng, pointLat]
return point
}
}