我正在尝试在查询中使用三角函数,想知道这是否是正确的方法/本地存储是否支持这种方法?
tx.executeSql('SELECT * FROM locations ORDER BY ACOS(COS(RADIANS(51.511214))*COS(RADIANS(locations.lat))*COS(RADIANS(locations.long)RADIANS(-0.119824))+SIN(RADIANS(51.511214))*SIN(RADIANS(locations.lat)) WHERE ROUND(locations.lat,3) LIKE 51.511214 AND ROUND(locations.long,2) LIKE -0.119824 LIMIT 0,5', [], Latlongquery, errorCB);
正如下面所指出的,我实际上是在谈论 WebSQL,因为本地存储不支持查询。对错误感到抱歉