Download
google map v2 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Google map v2 PowerPoint Presentation
Download Presentation
Google map v2

Google map v2

92 Views Download Presentation
Download Presentation

Google map v2

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Google map v2

  2. https://code.google.com/apis/console

  3. Manifest.xml > Manifest

  4. Manifest.xml > Application Name : com.google.ancdroid.maps.v2.API_KEY

  5. Manifest.xml > Permissions Name : com.gmac.simple.map2.permission.MAPS_RECEIVE Label : signature

  6. 선택 : android.permission.INTERNET android.permission.WRITE_EXTERNAL_STORAGE android.permission.ACCESS_NETWORK_STATE android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_COARSE_LOCATION 타이핑 : com.google.android.providers.gsf.permission.READ_GSERVICES

  7. Manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.gmac.simple.map2" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:label="signature" android:name="com.gmac.simple.map2.permission.MAPS_RECEIVE"></permission> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

  8. <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value=“your key value"/> <activity android:name="com.gmac.simple.map2.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

  9. Layout > activity_main.xml <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fragment" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent"/>

  10. MainActivity.java package com.gmac.simple.map2; // 자기 패키지명 import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.google.android.gms.maps.GoogleMap; public class MainActivity extends FragmentActivity { GoogleMapmGoogleMap; // 구글맵 객체 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }