|
@@ -1481,10 +1481,12 @@ function llrequest(ll){
|
|
|
_lat = parseFloat(llitude.split("_")[1]);//纬度
|
|
|
}
|
|
|
//alert(latitude+":::"+longitude+"----"+_lat+":::"+_long)
|
|
|
- if (caculateLL(latitude,longitude,_lat,_long)>parseInt(distance)){
|
|
|
+ var calculate = calculateLL(latitude,longitude,_lat,_long);
|
|
|
+ if (calculate>parseInt(distance)){
|
|
|
$.post("/publicapply/appLoc/action", {
|
|
|
"longitude": longitude,
|
|
|
- "latitude": latitude
|
|
|
+ "latitude": latitude,
|
|
|
+ "calculate": calculate
|
|
|
}, function (r) {
|
|
|
if (r.data) {
|
|
|
localStorage.LLitude = ll+"_"+new Date().getDate();
|
|
@@ -1493,7 +1495,7 @@ function llrequest(ll){
|
|
|
}
|
|
|
}
|
|
|
/*计算两经纬度点之间的距离(单位:米)*/
|
|
|
-function caculateLL(lat1, lng1, lat2, lng2) {
|
|
|
+function calculateLL(lat1, lng1, lat2, lng2) {
|
|
|
var radLat1 = lat1 * Math.PI / 180.0;
|
|
|
var radLat2 = lat2 * Math.PI / 180.0;
|
|
|
var a = radLat1 - radLat2;
|