파일 포멧 정의서

Similar documents
[ 그림 8-1] XML 을이용한옵션메뉴설정방법 <menu> <item 항목ID" android:title=" 항목제목 "/> </menu> public boolean oncreateoptionsmenu(menu menu) { getme

어댑터뷰

슬라이드 1

안드로이드기본 11 차시어댑터뷰 1 학습목표 어댑터뷰가무엇인지알수있다. 리스트뷰와스피너를사용하여데이터를출력할수있다. 2 확인해볼까? 3 어댑터뷰 1) 학습하기 어댑터뷰 - 1 -

Microsoft Word - ntasFrameBuilderInstallGuide2.5.doc

( )부록

9 차시고급위젯다루기 1 학습목표 날짜 / 시간과관련된위젯을배운다. 웹뷰를사용하여간단한웹브라우저기능을구현한다. 매니패스트파일의설정법을배운다. 2 확인해볼까? 3 날짜 / 시간위젯 1) 활동하기 활동개요

Microsoft PowerPoint - 11주차_Android_GoogleMap.ppt [호환 모드]

PathEye 공식 블로그 다운로드 받으세요!! 지속적으로 업그래이드 됩니다. 여러분의 의견을 주시면 개발에 반영하겠 습니다.

[ 그림 7-1] 프로젝트 res 폴더 이미지뷰 [ 예제 7-1] 이미지뷰 1 <LinearLayout 2 ~~~~ 중간생략 ~~~~ 3 android:orientation="vertical" > 4 <ImageView

JAVA PROGRAMMING 실습 08.다형성

PowerPoint Presentation

제8장 자바 GUI 프로그래밍 II

Windows 8에서 BioStar 1 설치하기

Microsoft PowerPoint Android-SDK설치.HelloAndroid(1.0h).pptx

JDK이클립스

03장

09-interface.key

Microsoft PowerPoint - 안드로이드 개발 환경 구축(170411)

SBR-100S User Manual

API - Notification 메크로를통하여어느특정상황이되었을때 SolidWorks 및보낸경로를통하여알림메시지를보낼수있습니다. 이번기술자료에서는메크로에서이벤트처리기를통하여진행할예정이며, 메크로에서작업을수행하는데유용할것입니다. 알림이벤트핸들러는응용프로그램구현하는데있어

2 Application Name: Day10_yhg <LinearLayout android:layout_weight="3" > /> an

1

13ÀåÃß°¡ºÐ

PowerPoint 프레젠테이션

View Licenses and Services (customer)

5장.key

PowerPoint Presentation

Studuino소프트웨어 설치

Install stm32cubemx and st-link utility

Title Here

쉽게 풀어쓴 C 프로그래밍

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Office 365 사용자 가이드

PowerPoint 프레젠테이션

사용설명서를 읽기 전에 안드로이드(Android)용 아이디스 모바일은 네트워크 연결을 통해 안드로이드 플랫폼 기반의 모바일 기기에서 장치 (DVR, NVR, 네트워크 비디오 서버, 네트워크 카메라) 에 접속하여 원격으로 영상을 감시할 수 있는 프로그램입니다. 장치의 사

ISP and CodeVisionAVR C Compiler.hwp

목차 윈도우드라이버 1. 매뉴얼안내 운영체제 (OS) 환경 윈도우드라이버준비 윈도우드라이버설치 Windows XP/Server 2003 에서설치 Serial 또는 Parallel 포트의경우.

Spring Boot/JDBC JdbcTemplate/CRUD 예제

<BEC8BEE7B4EBBDC7BDC0C0DAB7E12E687770>

1. 자바프로그램기초 및개발환경 2 장 & 3 장. 자바개발도구 충남대학교 컴퓨터공학과

PowerPoint Presentation

비긴쿡-자바 00앞부속

2) 활동하기 활동개요 활동과정 [ 예제 10-1]main.xml 1 <LinearLayout xmlns:android=" 2 xmlns:tools="

ArcGIS Desktop 9.2 Install Guide

MF3010 MF Driver Installation Guide

PowerPoint Template

rmi_박준용_final.PDF

JUNIT 실습및발표

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx

제11장 프로세스와 쓰레드

PowerPoint 프레젠테이션

ICAS CADWorx SPLM License 평가판설치가이드

PowerPoint Presentation

메뉴얼41페이지-2

Design Issues

기존에 Windchill Program 이 설치된 Home Directory 를 선택해준다. 프로그램설치후설치내역을확인해보면 Adobe Acrobat 6.0 Support 내역을확인할수 있다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

MF Driver Installation Guide

Microsoft PowerPoint UI-Event.Notification(1.5h).pptx

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밍

tiawPlot ac 사용방법

윈도우시스템프로그래밍

Oracle VM VirtualBox 설치 VirtualBox에서 가상머신 설치 가상머신에 Ubuntu 설치

슬라이드 1

Cubase AI installation guide

Google Maps Android API v2

Microsoft PowerPoint - 2강

윈도우시스템프로그래밍

을풀면된다. 2. JDK 설치 JDK 는 Sun Developer Network 의 Java( 혹은 에서 Download > JavaSE 에서 JDK 6 Update xx 를선택하면설치파일을

슬라이드 1

사용설명서를 읽기 전에 ios용 아이디스 모바일은 네트워크 연결을 통해 ios 플랫폼 기반의 모바일 기기(iOS 버전 6.0 이상의 ipod Touch, iphone 또는 ipad)에서 장치(DVR, 네트워크 비디오 서버 및 네트워크 카메라)에 접속하여 원격으로 영상을

6. 설치가시작되는동안 USB 드라이버가자동으로로드됩니다. USB 드라이버가성공적으로로드되면 Setup is starting( 설치가시작되는중 )... 화면이표시됩니다. 7. 화면지침에따라 Windows 7 설치를완료합니다. 방법 2: 수정된 Windows 7 ISO

IRISCard Anywhere 5

Microsoft Outlook G Suite 가이드

server name>/arcgis/rest/services server name>/<web adaptor name>/rest/services ArcGIS 10.1 for Server System requirements - 지

gnu-lee-oop-kor-lec06-3-chap7

슬라이드 1

05-class.key

2_안드로이드UI

슬라이드 1

JAVA 플랫폼 개발 환경 구축 및 활용

학습목표 메뉴를추가하는방법을이해하고실습할수있다. 프로그램의기본설정 (settings) 을정의하는방법을알고실습할수있다. 대화상자를여는방법을알고실습할수있다. 로그메시지로디버깅하는방법을이해한다. 디버거로디버깅하는방법을이해한다.

NTD36HD Manual

PowerPoint Template

슬라이드 1

CODESYS 런타임 설치과정

Microsoft PowerPoint _사용자매뉴얼.ppt

슬라이드 1

아이콘의 정의 본 사용자 설명서에서는 다음 아이콘을 사용합니다. 참고 참고는 발생할 수 있는 상황에 대처하는 방법을 알려 주거나 다른 기능과 함께 작동하는 방법에 대한 요령을 제공합니다. 상표 Brother 로고는 Brother Industries, Ltd.의 등록 상

Chapter 1

ThisJava ..

UI TASK & KEY EVENT

제이쿼리 (JQuery) 정의 자바스크립트함수를쉽게사용하기위해만든자바스크립트라이브러리. 웹페이지를즉석에서변경하는기능에특화된자바스크립트라이브러리. 사용법 $( 제이쿼리객체 ) 혹은 $( 엘리먼트 ) 참고 ) $() 이기호를제이쿼리래퍼라고한다. 즉, 제이쿼리를호출하는기호

q 이장에서다룰내용 1 객체지향프로그래밍의이해 2 객체지향언어 : 자바 2

var answer = confirm(" 확인이나취소를누르세요."); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write(" 확인을눌렀습니다."); else { document.write(" 취소를눌렀습니다.");

PowerPoint 프레젠테이션

슬라이드 1

(8) getpi() 함수는정적함수이므로 main() 에서호출할수있다. (9) class Circle private double radius; static final double PI= ; // PI 이름으로 로초기화된정적상수 public

Transcription:

MGIS Open API 지도 Viewer (Android 용 ) -i- Ver1.1

양면인쇄 -ii- Ver1.1

변경이력 변경코드내용변경일자 1.0 초안작성 2012/11/20 1.1 변경된지도서비스로샘플변경 2016/02/02 -iii- Ver1.1

목차 1. 클래스참조... 1 1.1. 클래스... 1 1.1.1. Public Properties... 1 1.1.2. Public Methods... 1 1.2. Overlay... 2 1.2.1. Public Methods... 2 1.3. Geometry... 3 1.3.1. Public Methods... 3 1.4.... 3 1.4.1. Public Properties... 4 1.4.2. Public Methods... 4 2. 튜토리얼... 5 3. MapView SDK 샘플... 13 3.1. 초기화... 14 3.2. 지도서비스선택... 14 3.3. Marker 매쉬업... 17 3.4. Tooltip 매쉬업... 18 3.5. InfoWindow 매쉬업... 19 3.6. Overlay 객체연결... 20 3.7. 거리재기... 21 3.8. 면적재기... 21 3.9. 공간객체매쉬업... 22 3.10. 좌표변환... 25 -iv- Ver1.1

1. 클래스참조 지도표출, 매쉬업도구, 이벤트처리를빠르고손쉽게응용어플리케이션에서활용가능하도록제공되는라이브러리로대표클래스는지도뷰, 매쉬업도구, 이벤가제공됩니다. 본문서에서는대표클래스에대한정의를서술하였고세부참조는제공되는개발용도움말문서를참조바랍니다. package class Description com.mapntech.view.class 지도를표현하는 View 클래스 com.mapntech.overlay Overlay.class 매쉬업도구의최상위인터페이스 com.mapntech.overlay.geo Geometry.class 공간정보를표현하는상위객체 com.mapntech.overlay.view.class 뷰를포함한오버레이객체의최상위객체 1.1. 클래스 Package com.mapntech.view public class extends ViewGroup 지도를표현하는메인클래로 1.1.1. Public Properties Properties Description Defined by DRAWMODE_AREA 그리기모드의면적재기상수값 (static int) DRAWMODE_DISTANCE 그리기모드의거리재기상수값 (static int) 1.1.2. Public Methods Methods (Context context) ViewGroup을상속받은지도뷰객체 (Context context, String key, String servicename) ViewGroup을상속받은지도뷰객체 void setmapcenter(coordinate coord, int level) 지도의중심좌표를셋팅한다. void setmapcenter(double centerx, double centery, int level) 지도의중심좌표를셋팅한다. Defined by -1- Ver1.1

boolean setmapservice(string map) 지도서비스를요청한다 void startdistance(int mode, Paint pt) 그리기모드를셋팅한다. void enddistance() 거리재기 or 면적재기종료 int addoverlay(overlay geo) 오버레이객체를 Map에등록한다. void removeoverlay(overlay geo) Map에등록된오버레이객체를제거한다. boolean removeoverlayall() Map에등록된오버레이모두를삭제한다. Envelope getlimitmbr() 지도의최대전체영역정보를리턴한다. int getnowlevel() 현재레벨의축척정보를리턴한다. double getpixelpermeter() 현재지도축척의 1픽셀의실제거리를리턴 void zoomin() 한단계확대 void addlongtoucheventlistener(longtoucheventlistener oel) 터치이벤트등록 void addmapboundarylistener(mapboundarylistener oel) 지도영역이벤트등록 void addtoucheventlistener(toucheventlistener oel) 터치이벤트등록 void removelongtoucheventlistener(longtoucheventlistener oel) 터치이벤트제거 void removemapboundarylistener(mapboundarylistener oel) 지도영역이벤트제거 void removetoucheventlistener(toucheventlistener oel) 터치이벤트제거 1.2. Overlay Package com.mapntech.overlay public interface Overlay All Known Implementing Classes: Circle, Envelope, Geometry, InfoWindow, Marker,, Point, Polygon, Polyline, Tooltip 매쉬업객체의최상위인터페이스로하위분류로 Geometry, 로구분됩니다. Geometry는 Circle, Point, Polygon, Polyline, Envelope의상위객체로공간데이터를정의하는객체입니다. 는 InfoWindow, Marker, Tooltip 의상위객체로지도위에표현되는 View를정의하는객체입니다. 1.2.1. Public Methods Methods Defined by -2- Ver1.1

Void finallize() 객체리소스반환 Void getdraworder() 현재객체의그려지는순서를리턴 Boolean getvisible() 현재객체가지도에표현되어있는상태를리턴 void setdraworder(int zvalue) 현재객체가지도에드려질때순서를정한다 void setvisible(boolean mode) 현재객체를지도위에표현할지를셋팅 Overlay Overlay Overlay Overlay Overlay 1.3. Geometry Package com.mapntech.overlay.geo public abstract class Geometryextends Objectimplements Overlay Direct Known Subclasses: Circle, Envelope, Point, Polygon, Polyline 공간객체정보를표현하는상위객체 1.3.1. Public Methods Methods Void addcoordinate(coordinate coord) 좌표를추가한다. Void finallize() 객체리소스초기화 Coordinate getcoordinate(int idx) 좌표를리턴한다. int getcoordinatecnt() 좌표갯수를리턴한다. int getdraworder() 현재객체의그려지는순서를리턴 Paint getpaint() 그리기설정객체를리턴한다. Boolean getvisible() 지도뷰에표현상태를리턴한다 Boolean removecoordinate(int idx) 좌표를제거한다. Void setdraworder(int draworder) 현재객체가지도에드려질때순서를정한다. Void setpaint(paint pt) 그리기설정객체를등록한다. Void setvisible(boolean mode) 지도뷰에표현될지를설정한다. Defined by Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry 1.4. Package com.mapntech.overlay.view public abstract class extends Objectimplements Overlay Direct Known Subclasses: InfoWindow, Marker, Tooltip 뷰를포함한오버레이객체의최상위객체 -3- Ver1.1

1.4.1. Public Properties Properties Description Defined by static int ATTACH_BOTTOM 자식뷰가왼쪽에위치하는상수 static int ATTACH_TOP 자식뷰가위쪽에위치하는상수 static int ATTACH_RIGHT 자식뷰가오른쪽에위치하는상수 static int ATTACH_BOTTOM 자식뷰가아래에위치하는상수 1.4.2. Public Methods Methods Void finallize() 객체리소스초기화 getchildviewitem() 연결된자식오버레이객체를리턴한다 int getchildviewitemlocation() 자식오버레이의위치리턴 Coordinate getcoord() 오버레이객체의좌표를리턴한다. int getdraworder() 현재객체의그려지는순서를리턴 Int getoffsetx() 현재뷰에중심원점으로부터 X축좌표와매칭되는좌표 Int getoffsety() 현재뷰에중심원점으로부터 Y축좌표와매칭되는좌표 getparentviewitem() 현재오버레이의부모오버레이를리턴한다. RectF getviewarea() 현재오버레이의단말화면상의존재하는영역정보를리턴한다. Boolean getvisible() 오버레이객체의 visible 상태를리턴한다. void setchildviewitem( childviewitem, int mode) 현재오버레이에자식오버레이를셋팅한다. void setcoord(coordinate coord) 오버레이객체좌표를셋팅한다. Void setdraworder(int draworder) 오버레이객체의그리는순서를설정한다. Void setoffset(int offsetx, int offsety) 오버레이객체의화면좌표를기준으로이동한다. Void setoverlayclickeventlistener(overlayclickeventlistener ocel) 클릭이벤트를등록한다. setoverlaytoucheventlistener(overlaytoucheventlistener otel) 터치이벤트를등록한다 void setvisible(boolean mode) 오버레이객체의 visible 을셋팅한다. Defined by -4- Ver1.1

2. 튜토리얼 Android SDK 를다운로드받는과정 1) 안드로이드 SDK 는안드로이드개발자사이트 (http://dev.android.com) 에서다운로드 받을수있습니다. 아래그림은이사이트의초기화면입니다. 위그림을보시면탭모양의메뉴가 7 개있습니다. 그중왼쪽으로부터 2 번째에속하는 SDK 메뉴를클릭하세요. -5- Ver1.1

SDK 메뉴에들어가시면, 위그림과같이 Download the Android SDK 페이지가호출됩니다. 그안에있는테이블이플랫폼별로 Android SDK 를다운로드받을수있는링크들을제공합니다. 사용중인 PC 의운영체제에해당되는링크를클릭하시면, 아래그림과같이파일다운로드창이나타납니다. ' 저장 ' 버튼을클릭하여파일을다운로드합니다. Android SDK 파일을다운로드후에실행합니다. -6- Ver1.1

2) 'Next >' 버튼을눌러다음페이지로넘어갑니다. 만약 JDK 가이미설치되어있다면, '< Back' 버튼을클릭합니다.. 그리고나서다시 'Next >' 버튼을클릭하세요. 그러면아래그림과같이 JDK 가발견됨이확인됩니다. -7- Ver1.1

3) 'Next >' 버튼을클릭하여다음창으로가고설치경로를지정합니다. 아래그림을 보시면, 기본설치경로가 C:\Program Files\Android\android-sdk 입니다. -8- Ver1.1

4) 다음단계는시작메뉴폴더를지정합니다. 설치중화면은아래그림을참고하세요. 5) 설치가완료되면, 아래그림과같이 'Next >' 버튼이활성화됩니다. -9- Ver1.1

6) 마지막페이지에서는설치가완료되었음을알립니다. SDK Manager 를시작할것인지를 묻습니다. Start SDK Manager 를체크하고 'Finish' 버튼을클릭합니다. 7) Android SDK Manager 라는이름의윈도우가아래그림과같이실행됩니다. 설치할 android SDK 를선택합니다. -10- Ver1.1

8) 이후아래그림과같이 Choose Package to Install 창이나타납니다. Install 버튼을 클릭하시면, 설치가시작됩니다. -11- Ver1.1

9) 패키지설치도중아래그림과같이 ADB Restart 를묻는메시지박스가팝업되면 Yes 버튼을클릭후설치가완료됩니다. -12- Ver1.1

3. MapView SDK 샘플 MapViewSDK에서제공되는 API를활용하여샘플프로그램과샘프코드를제공합니다. MapViewSDK.apk 안드로이드폰에복사한후설치합니다. MapViewSDKActivity.java Apk의존재하는 Activity 샘플코드 < 구동초기화면 > -13- Ver1.1

3.1. 초기화지도객체를생성하고해당하는지역에요청되는레벨로이동합니다. 참조 - MapViewSDKActivity.java의 mapinit() 함수참조 // 지도객체를생성합니다. this.map = new MWMap(this, "bf5ab1d4a3294328a5957ac14244eb25", "emap_kor_normal"); //WGS84 좌표를 UTM-K 좌표로좌표변환합니다. conv.setsrctype(geoellips.kwgs84, GeoSystem.kGeographic); conv.setdsttype(geoellips.kgrs80, GeoSystem.kUtmKR); Coordinate utmpoint = conv.conv(new Coordinate(126.977864, 37.566447)); //x, y, 8레벨로지도를이동합니다. map.setmapcenter( utmpoint.getx(), utmpoint.gety(), 8); 3.2. 지도서비스선택다국어지도를선택합니다. 제공되는지도의종류는일반지도 ( 국문, 영문, 일문, 중문간체, 중문번체 ), 항공지도 ( 국문, 영문, 일문, 중문간체, 중문번체 ) 를제공합니다. 참조 - MapViewSDKActivity.java의 onitemselected () 함수참조 @Override public void onitemselected(adapterview<?> arg0, View arg1, int arg2, long arg3) { if(arg2 == 0){ // 국문일반지도선택 map.setmapservice("emap_kor_normal"); else if(arg2 == 1){ // 영문일반지도선택 map.setmapservice("emap_eng_normal"); else if(arg2 == 2){ // 일문일반지도선택 map.setmapservice("emap_jan_normal"); else if(arg2 == 3){ // 중문간체일반지도선택 map.setmapservice("emap_chinag_normal"); -14- Ver1.1

else if(arg2 == 4){ // 중문번체일반지도선택 map.setmapservice("emap_chinab_normal"); else if(arg2 == 5){ // 국문항공지도선택 map.setmapservice("emap_kor_air"); else if(arg2 == 6){ // 영문항공지도선택 map.setmapservice("emap_eng_air"); else if(arg2 == 7){ // 일문항공지도선택 map.setmapservice("emap_jan_air"); else if(arg2 == 8){ // 중문간체항공지도선택 map.setmapservice("emap_chinag_air"); else if(arg2 == 9){ // 중문번체항공지도선택 map.setmapservice("emap_chinab_air"); else if(arg2 == 10){ // 중문번체항공지도선택 map.setmapservice("emap_kor_web_normal"); else if(arg2 == 11){ // 중문번체항공지도선택 map.setmapservice("emap_oldmap1"); else if(arg2 == 12){ // 중문번체항공지도선택 map.setmapservice("emap_oldmap2"); -15- Ver1.1

-16- Ver1.1

3.3. Marker 매쉬업 지도위의지점에이미지또는텍스트로매쉬업합니다. 참조 - MapViewSDKActivity.java의 setmarker () 함수참조 // 지도에등록된오버레이객체전부를제거한다. this.map.removeoverlayall(); Bitmap markerbitmap = this.getbitmap(r.drawable.gpspin); // 마커객체생성 Marker mk = new Marker(new Coordinate(this.centerX, this.centery)," 시작 ",markerbitmap); // 마커객체등록 this.map.addoverlay(mk); // 이미지의중심을원점으로지도좌표와매핑되도록셋팅한다. mk.setoffset(0, -markerbitmap.getheight()/2); // 마커의텍스트사이즈셋팅 mk.settextsize(50); // 텍스트의중심을원점으로지도좌표와매핑되도록셋팅한다. mk.settextoffset(0, mk.gettextsize()/2); // 마터의텍스트칼라를셋팅한다. mk.settextcolor(color.blue); // 마커에터치이벤트를등록한다. mk.setoverlaytoucheventlistener(this); // 심볼의투명도를셋팅한다. mk.setsymbolalpha(200); -17- Ver1.1

3.4. Tooltip 매쉬업지도위의지점에툴팁으로매쉬업합니다. 참조 - MapViewSDKActivity.java의 settooltip () 함수참조 // 지도에등록된오버레이객체전부를제거한다. map.removeoverlayall(); // 툴팁객체를생성한다. Tooltip tt = new Tooltip( new Coordinate(this.centerX+100, this.centery+100)," 첫줄 \r\n 두번째줄.\r\n 세번째줄 \r\n 네번째줄 "); // 툴팁의텍스트사이즈를설정한다 tt.settextcolor(color.blue); // 툴팁의텍스트사이즈를설정한다. tt.settextsize(15); // 툴팁에클릭이벤트를등록한다. tt.setoverlayclickeventlistener(this); // 맵에툴팁을등록한다. map.addoverlay(tt); Tooltip tt1 = new Tooltip(new Coordinate(this.centerX+300, this.centery+300)," 시작아이콘입니다 \r\n 길이테스트. \r\n 세줄테스트 "); tt1.settextsize(20); tt1.setoverlaytoucheventlistener(this); map.addoverlay(tt1); -18- Ver1.1

3.5. InfoWindow 매쉬업지도위의지점에인포윈도우로매쉬업합니다. 참조 - MapViewSDKActivity.java의 setinfobox () 함수참조 // 지도에등록된오버레이객체를제거한다. map.removeoverlayall(); // 텍스트뷰생성 TextView textview = new TextView(this); textview.settext(" 인포박스테스트 "); textview.settextcolor(color.red); textview.settextsize(20); textview.setpadding(0, 0, 0, 0); // 이미지뷰생성 ImageView wifiimage = new ImageView(this); wifiimage.setimageresource(r.drawable.poi_food); // 이미지뷰생성 ImageView g3image = new ImageView(this); g3image.setimageresource(r.drawable.threegs_icon); // 인포박스에삽입하기위한레이아웃정의 LinearLayout innerlayout = new LinearLayout(this); android.widget.linearlayout.layoutparams param = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); innerlayout.setorientation(linearlayout.vertical); innerlayout.addview(textview); innerlayout.addview(wifiimage); innerlayout.addview(g3image); // 인포박스객체생성 InfoWindow iw = new InfoWindow(new Coordinate(this.centerX, this.centery), null, innerlayout, param); // 지도에인포박스등록 map.addoverlay(iw); -19- Ver1.1

3.6. Overlay 객체연결매쉬업객체의연결성정보를설정하여 Overlay 객체와연결합니다. 참조 - MapViewSDKActivity.java의 setoverlayconnect () 함수참조 TextView textview = new TextView(this); textview.settext(" 인포박스테스트 "); textview.settextcolor(color.red); textview.settextsize(20); textview.setpadding(0, 0, 0, 0); Rect margin2 = new Rect(10, 30, 10, 10); ImageView wifiimage = new ImageView(this); wifiimage.setimageresource(r.drawable.wifi_icon); ImageView g3image = new ImageView(this); g3image.setimageresource(r.drawable.threegs_icon); LinearLayout innerlayout = new LinearLayout(this); android.widget.linearlayout.layoutparams param = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); innerlayout.setorientation(linearlayout.vertical); innerlayout.addview(textview); innerlayout.addview(wifiimage); innerlayout.addview(g3image); // 인포박스생성 InfoWindow iw = new InfoWindow(margin2, innerlayout, param); //map.addoverlay(iw); Marker mk3 = new Marker(new Coordinate(this.centerX-200, this.centery-200),null, this.getbitmap(r.drawable.poi_subway)); mk3.setoffset(0, -57/2); mk3.setoverlaytoucheventlistener(this); // 마커에인포박스를등록한다. mk3.setchildviewitem(iw,.attach_left); map.addoverlay(mk3); -20- Ver1.1

3.7. 거리재기지도위에서 Touch를통하여거리를측정합니다. 참조 - MapViewSDKActivity.java의 setstartdistance () 함수참조 /** * 거리재기를시작합니다. */ private void setstartdistance() { // TODO Auto-generated method stub this.map.startdistance(.drawmode_distance, null); 3.8. 면적재기지도위에서 Touch를통하여면적을측정합니다. 참조 - MapViewSDKActivity.java의 setstartarea () 함수참조 /** * 면적재기를시작합니다. */ private void setstartarea(){ this.map.startdistance(.drawmode_area, null); -21- Ver1.1

3.9. 공간객체매쉬업 Point, Polyline, Polygon, Circle, Envelope의공간객체를지도위에매쉬업한다. 참조 - MapViewSDKActivity.java의 setgeometry () 함수참조 // 맵에등록된오버레이객체를모두제거한다. this.map.removeoverlayall(); // 폴리라인그리기속성생성 Paint linept = new Paint(); linept.setstyle(style.stroke); linept.setstrokewidth(4); linept.setantialias(true); linept.setcolor(color.black); linept.setalpha(150); // 폴리라인생성 Polyline line = new Polyline(); // 폴리라인에그리기속성셋팅 line.setpaint(linept); // 맵에폴리라인등록 this.map.addoverlay(line); double tx = this.centerx; double ty = this.centery; line.addcoordinate(new Coordinate(tx-=50, ty-=50)); line.addcoordinate(new Coordinate(tx-=60, ty-=70)); line.addcoordinate(new Coordinate(tx-=10, ty-=50)); line.addcoordinate(new Coordinate(tx-=50, ty-=10)); line.addcoordinate(new Coordinate(tx-=50, ty-=50)); // 원그리기속성생성 Paint circlept = new Paint(); circlept.setstyle(style.fill_and_stroke); -22- Ver1.1

circlept.setstrokewidth(4); circlept.setantialias(true); circlept.setcolor(color.red); circlept.setalpha(50); // 원객체생성 Circle circle = new Circle(new Coordinate(this.centerX,this.centerY), 100); // 원그리기속성셋팅 circle.setpaint(circlept); // 맵에원등록 this.map.addoverlay(circle); // 폴리곤그리기속성생성 Paint polygonpt = new Paint(); polygonpt.setstyle(style.fill); polygonpt.setstrokewidth(4); polygonpt.setantialias(true); polygonpt.setcolor(color.gray); polygonpt.setalpha(100); double tempx = centerx; double tempy = centery; polygon.addcoordinate(new Coordinate(centerX,centerY)); polygon.addcoordinate(new Coordinate(tempx+=100,tempy+=100)); polygon.addcoordinate(new Coordinate(tempx+=200,tempy+=300)); polygon.addcoordinate(new Coordinate(tempx+=400,tempy+=100)); polygon.addcoordinate(new Coordinate(tempx+=50,tempy+=20)); polygon.addcoordinate(new Coordinate(tempx-=400,tempy-=400)); polygon.addcoordinate(new Coordinate(tempx-=400,tempy-=400)); polygon.addcoordinate(new Coordinate(centerX,centerY)); // 직사각형그리기속성생성 Paint recpt = new Paint(); recpt.setstyle(style.fill); -23- Ver1.1

recpt.setstrokewidth(4); recpt.setantialias(true); recpt.setcolor(color.magenta); recpt.setalpha(100); // 직사각형객체생성 Envelope env = new Envelope(centerX -300, centerx -200, centery, centery+100); // 직사각형그리기속성셋팅 env.setpaint(recpt); // 맵에직사각형객체셋팅 this.map.addoverlay(env); map.postinvalidate(); -24- Ver1.1

3.10. 좌표변환단말기의 GPS 에서측위되는좌표를 GRS80 TM 중부원점평면좌표계로변환합니다. 참조 - MapViewSDKActivity.java의 onlocationchanged () 함수참조 @Override public void onlocationchanged(location location) { if(this.nowlocationmode == false){ return; mylocation = location; double latpointt = mylocation.getlatitude(); double lngpointt = mylocation.getlongitude(); Toast toast = Toast.makeText(this, " x= " + lngpointt + ", y = " + latpointt, Toast.LENGTH_SHORT); // TODO Auto-generated method stub // WGS84 경위도좌표를 GRS80 중부원점으로좌표변환 conv.setsrctype(geoellips.kwgs84, GeoSystem.kGeographic); conv.setdsttype(geoellips.kgrs80, GeoSystem.kTmMid); Coordinate utmpoint = conv.conv(new Coordinate(lngPointT, latpointt)); this.map.setmapcenter(utmpoint, 8); -25- Ver1.1