Constructor
new ExportImagePartialArea()
객체 초기 상태를 설정한다.
Methods
downloadJPG()
현재 화면을 JPG 포맷으로 저장한다.
downloadJPGEx(mode, callback)
현재 설정영역을 JPG 포맷이나 base64형식으로 반환한다.
Example
//화면 왼쪽 상단으로부터 (100,100) 만큼 이동한 위치에서 이미지 영역을 설정한다.
window.exportImagePartialArea.setPositionAbsolute(100, 100);
window.exportImagePartialArea.downloadJPGEx('base64', result => {
console.log(result.startGeographic, result.endGeographic, result.href);
});
Parameters:
Name | Type | Default | Description |
---|---|---|---|
mode |
string |
file
|
'file'과 'base64' 중 택일(기본은 'file') |
callback |
object | 설정영역(경위도)정보와 파일 혹은 base64로 링크정보 반환 |
downloadPNG()
현재 화면을 PNG 포맷으로 저장한다.
downloadPNGEx(mode, callback)
현재 설정영역을 PNG 포맷이나 base64형식으로 반환한다.
Example
//화면 왼쪽 상단으로부터 (100,100) 만큼 이동한 위치에서 이미지 영역을 설정한다.
window.exportImagePartialArea.setPositionAbsolute(100, 100);
window.exportImagePartialArea.downloadPNGEx('base64', result => {
console.log(result.startGeographic, result.endGeographic, result.href);
});
Parameters:
Name | Type | Default | Description |
---|---|---|---|
mode |
string |
file
|
'file'과 'base64' 중 택일(기본은 'file') |
callback |
object | 설정영역(경위도)정보와 파일 혹은 base64로 링크정보 반환 |
setFileName(string)
이미지 저장시 파일명을 설정한다.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | 이미지 저장 파일명 |
setPositionAbsolute(left, top)
설정영역 선택 시 화면 왼쪽 상단으로부터의 이동량을 설정한다.
이 함수를 의도적으로 호출하지 않을 경우 왼쪽 상단의 디폴트 기준 좌표값은 (0, 0)으로 설정되어 있다.
Parameters:
Name | Type | Description |
---|---|---|
left |
number | 화면 기준 왼쪽 좌표값 |
top |
* | 화면 기준 위쪽 좌표값 |