Subversion Repositories SmartDukaan

Rev

Rev 30533 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30533 Rev 30589
Line 414... Line 414...
414
 
414
 
415
		} else if (status.equals("active")) {
415
		} else if (status.equals("active")) {
416
			JSONObject c = jsonObj.getJSONObject("location");
416
			JSONObject c = jsonObj.getJSONObject("location");
417
			JSONObject d = c.getJSONObject("geometry");
417
			JSONObject d = c.getJSONObject("geometry");
418
			JSONArray coords = d.getJSONArray("coordinates");
418
			JSONArray coords = d.getJSONArray("coordinates");
419
			double lat1 = 28.516045882182738;
-
 
420
			double lng1 = 77.3771954997187;
-
 
421
 
419
 
422
			double lat2 = coords.getDouble(1);
420
			double lat2 = coords.getDouble(1);
423
			double lng2 = coords.getDouble(0);
421
			double lng2 = coords.getDouble(0);
424
			dist = distance(Float.valueOf(fs.getLatitude()), Float.valueOf(fs.getLongitude()), lat2, lng2, "m");
422
			dist = distance(Float.valueOf(fs.getLatitude()), Float.valueOf(fs.getLongitude()), lat2, lng2, "m");
425
 
423
 
426
			// dist = distance(lat1, lng1, lat2, lng2, "m");
424
			// dist = distance(lat1, lng1, lat2, lng2, "m");
427
			LOGGER.info("jsonObj" + jsonObj);
425
			LOGGER.info("jsonObj" + jsonObj);
-
 
426
 
-
 
427
			LOGGER.info("dist" + dist);
428
			JSONObject deviceData = deviceStatus.getJSONObject("data");
428
			JSONObject deviceData = deviceStatus.getJSONObject("data");
429
			LOGGER.info("status1" + status);
429
			LOGGER.info("status1" + status);
430
 
430
 
431
		}
431
		}
432
		return responseSender.ok(dist);
432
		return responseSender.ok(dist);