안드로이드매니페스트.xml
<uses-library android:name="com.google.android.maps"></uses-library>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-library android:name="com.google.android.maps"></uses-library>
Main.java
public class Main extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mv = ( MapView ) findViewById( R.id.mapView );
mv.setSatellite( true );
mv.setStreetView( true );
mv.setTraffic( true );
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:enabled="true"
android:clickable="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="발급받은 key">
</LinearLayout>
소스는 이렇습니다.
예제대로 핑거프린트를 얻어서 key로 얻어내어서 입력하고 소스도 이렇게 다 짰습니다.
그리고 프로젝트를 생성할때 googleapi 제일 높은버젼으로 만들고 라이브러리도 매니페스트에 추가했습니다.
그런데 타일만 나오고 지도가 나오지 않습니다. 이거 왜이런지 아시는분...