This document is organized by referring to the Naver Map Android SDK Integration Guide출처 : https://navermaps.github.io/android-map-sdk/guide-ko/1.html
To use the Start neighbor map Android SDK, you must issue the client ID from NAV cloud platform, you must issue the client ID to specify the ID to SDK.The neighbor map SDK is available in Android OS version 4.0.3 (API Level 15).To use the client ID issue of client ID, register map SDK, registering applications and obtain the client ID.NAVER Cloud PlatformLog in to , and enter the console. Products & Services 에서 AI-Application Service ···navermaps.github.io
To use the neighbor map SDK, you must issue the client ID from NAV cloud platform to use the NAVER cloud platform.The corresponding OS version neighbor map SDK is available in Android OS version 4.0.3 (API Level 15).To use the client ID issue of client ID, register map SDK, registering application to obtain the client ID.Log in to the NAVER cloud platform and enter the console.Select AI-Application Service lower AIAVAPI in Product & Services.Select Application Registration and check the lower Mobile Dynamic Map.If you do not select the authentication failure (4) is not selected.Add the package name for Android app, and register the package name of the application to use the neighbor map SDK.If you do not enter correctly, authentication failure error (0).Select authentication information for registered applications and verify the Client ID.For more information, see Application Usage Guide.The dependency additional neighbor map SDK is distributed in https://naver.jfrog.io/artifactory/maven/ .Add repository settings for route project.g.graddle.This example shows how to add repository configuration.
All projects {Repository {google()mavenCentral()maven(“https://naver.jfrog.io/artifactory/maven/ “)}}
The Android studio I tested was Android Studio Giraffe | 20223.1. Patch 2 version does not have allprojects item in the build.gradle of the root project.In this case, you can add it to settings.gradle.
依存関係解決管理{epositories}Mode*.set(リポジトリモード)。*FAIL_ON_PROJECT_REPOS) {google()mavenCentral(“https://jitpack.io “)maven(“https://naver.jfrog.io/artifactory/maven/ “)}}}
Then, the application module build.gradle declares its dependence on the neighbor map SDK.The following is an example of declaring dependence on the neighbor map SDK.
Dependencies {// 네이버 지도 SDK 実装(“com.naver.maps:map-sdk:3.17.0”)}
If you specify the client ID specified client ID to SDK, you can use map API.Client ID can be specified in two ways.AndroidManifest.xml에 지정[AndroidManifest.xml](<https://developer.android.com/guide/topics/manifest/manifest-intro>)의 [<meta-data>](<https://developer.android.com/guide/topics/manifest/meta-data-element>)로 클라이언트 ID를 지정할 수 있습니다. [<application>](<https://developer.android.com/guide/topics/manifest/application-element>) 아래에 <meta-data> 요소를 추가하고, name으로 com。naver.maps.map.CLIENT_IDを、valueで発行されたクライアントIDを指定します.This example shows how to specify client ID for Android Manager.
<manifest><アプリケーション><meta-data android:name=”com.naver.map.CLIENT_ID”android:value=”YOUR_CLIENT_ID_HERE” /></application></manifest>
The name of the client for public institutions is com.naver.maps.map.CLIENT_TYPE, <meta-data> with value gov must be specified.The following is an example of designating a public institution client for Android Manifext.xml.
<manifest><application><meta-data android:name=”com.naver.map.CLIENT_ID”android:value=”YOUR_CLIENT_ID_HERE” /><meta-data android:name=”com.naver.map.CLIENT_TYPE”android:value=”gov” /></application>
You can also call the API, call the API, and specify the client ID without modifying the specified Android Manifest.xml. Call NaverMapSdk.setClient() in the onCreate() of the application and specify the NaverCloudPlatformClient. NaverMapSdk is a single-ton class, so you have to use getInstance() to get an instance.The following example calls the API to specify the client ID.クラスYourApplication:Application() {fun onCreate() {super.onCreate() NaverMapSdk.getInstance(this)。client = NaverMapSdk.Neighbor Cloud Platform Client(“)YOUR_CLIENT_ID_HERE”)}}}Public institution clients use the Naver Cloud Platform Gov Client instead of the NaverCloud Platform Client.The following is an example of calling an API to specify a client for public institutions.クラスYourApplication:Application() {fun onCreate() {super.onCreate() NaverMapSdk.getInstance(this)。client = NaverMapSdk.Neighbor Cloud Platform GovClient(“)YOUR_CLIENT_ID_HERE”)}}}When you specify a map display client ID and add MapFragment to the app layout, the map appears on the screen.The following example shows how to add MapFragment to an XML layout as a <Fragment Container View> element and display the map on the screen.<androidx.fragment.app.FragmentContainerAndroid:id=”@+id/map_fragment”android:layout_width=”match_parent”android:layout_height=”match_parent”android:name=”com.naver.map.map.MapFragment” /><androidx.fragment.app.FragmentContainerAndroid:id=”@+id/map_fragment”android:layout_width=”match_parent”android:layout_height=”match_parent”android:name=”com.naver.map.map.MapFragment” />This is Yeongdong, a map of NaverBelow is the overall source code.Naver_Map_Activity.ktpackage com.dgjava.app01importandroid.os.os.Bundle import androidx.appcompat.app.AppCompatActivityimportcom.labor.bank.construct.app01。Rclass Naver_Map_Activity:AppCompatActivity() {Create(savedInstanceState:Bundle?) Overwrite the fun of {super.onCreate(savedInstanceState)setContentView( R.layout.naver_map_layout )}}Neighbor_map_layout.xmlNeighbor_map_layout.xml<?xml version=”1.0″ encoding=”utf-8″ ですか?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android “android:orientation=”vertical”android:layout_width=”match_parent”><RelativeLayout android:layout_width=”match_parent”android:layout_height= “55dp”android:background= “#FFFFFF”><テキストビューのAndroid:id=@+id/title_wride_content_wride=wraparteditlecontent android:id=”@+id/back_img”android:layout_width=”55dp”android:layout_height=”55d[android:scaleType=”centerInside”android:src=”@drawable/back” /></RelativeLayout><Android:layout_width=”match_parent”android:layout_height=”2px”android:background=”#8888888″/><LinearLayoutandroid:layout_width=”match_parent”android:layout_height= “0 px”android:layout_weight= “1” android:orientation= “vertical”><android= “15dp>< fragmentx.app .app を表示します.FragmentContainerViewandroid:id=”@+id/map_fragment”android:layout_width=”match_parent”android:layout_height=”match_parent”android:name=”com.naver.map.MapFragment” /></LinearLayout><Android:layout_width=”match_parent”android:layout_height=”1px”android:background=”#888888″/><LinearLayoutandroid:layout_width=”match_parent”android:layout_height= “70dp”android:paddingLeft=”15dpandroid:paddingRight= “15dpand:gravivity=center>を表示します<TextView android:id=”@+id/tv_next”android:layout_width=”match_parent”android:layout_height=”50dp”android:background=”#0000FF”android:textColor= “#FFFFFF”android:textSize= “15dp”android:textStyle= “bold:gravivity= “center/Linearinearielinearious>レイアウト</Linear></></Layout></<?xml version=”1.0″ encoding=”utf-8” ですか?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android “android:orientation=”vertical”android:layout_width=”match_parent”><RelativeLayout android:layout_width=”match_parent”android:layout_height= “55dp”android:background= “#FFFFFF”><テキストビューのAndroid:id=@+id/title_wride_content_wride=wraparteditlecontent android:id=”@+id/back_img”android:layout_width=”55dp”android:layout_height=”55d[android:scaleType=”centerInside”android:src=”@drawable/back” /></RelativeLayout><Android:layout_width=”match_parent”android:layout_height=”2px”android:background=”#8888888″/><LinearLayoutandroid:layout_width=”match_parent”android:layout_height= “0 px”android:layout_weight= “1” android:orientation= “vertical”><android= “15dp>< fragmentx.app .app を表示します.FragmentContainerViewandroid:id=”@+id/map_fragment”android:layout_width=”match_parent”android:layout_height=”match_parent”android:name=”com.naver.map.MapFragment” /></LinearLayout><Android:layout_width=”match_parent”android:layout_height=”1px”android:background=”#888888″/><LinearLayoutandroid:layout_width=”match_parent”android:layout_height= “70dp”android:paddingLeft=”15dpandroid:paddingRight= “15dpand:gravivity=center>を表示します<TextView android:id=”@+id/tv_next”android:layout_width=”match_parent”android:layout_height=”50dp”android:background=”#0000FF”android:textColor= “#FFFFFF”android:textSize= “15dp”android:textStyle= “bold:gravivity= “center/Linearinearielinearious>レイアウト</Linear></></Layout></