========== MLocation ========== MLocation Framework 에 대한 필수 API 를 정의 --------- Location API --------- 위치 정보 기능을 제공한다. 위치 정보 -------------- .. js:function:: M.plugin("location").current( setting ) .. versionchanged:: 2.1.0.2 :param Object setting: 위치 정보를 가져오기 위한 설정 정보 :param String setting.timeout: 타임 아웃 (milliseconds) :param String setting.maximumAge: 최근 위치 정보 여부를 판단하기 위한 델타 값 :param String setting.callback: 위치 정보 반환을 위한 콜백 함수 * 위치 정보를 가져온다. Surrogate Keys: 위 옵션키들과 같은 하위 버전 호환을 위한 대체 옵션 값들 * on = callback Example: .. code-block:: javascript M.plugin("location").current({ timeout: 10000, maximumAge: 1, callback: function( result ) { if ( result.status === 'NS' ) { console.log('This Location Plugin is not supported'); } else if ( result.status !== 'SUCCESS' ) { if ( result.message ) { console.log( result.status + ":" + result.message ); } else { console.log( 'Getting GPS coords is failed' ); } } else { if ( result.coords ) { console.log( JSON.stringify(result.coords) ); } else { console.log( 'It cann\'t get GPS Coords.' ); } } } });