728x90

현재 위치한 반경 km 범위내 데이터를 가져오는 쿼리문

숫자가 직접 기입된 부분을 userLAT, userLNG 로 바꿔줘야 한다.

 

--쿼리문
SELECT *, (6371 * acos(cos(radians(37.504696)) * cos(radians(latitude)) * cos(radians(longitude) - radians(127.041237)) + sin(radians(37.504696))*sin(radians(latitude)))) AS distance 
FROM blding 
HAVING distance <= 0.5 
ORDER BY distance;
 

 

지도를 움직일 경우 ** 정보를 조회해서 화면에 표시될 수 있도록 한다.

지도를 일정 레벨 이상으로 확대했을 경우, 해당 위치에 있는 정보 List를 서버에 요청한다.

onCameraMove → showList() → getDataFromServer() → addMarker()

 

 

 

블로그 이미지

Link2Me

,