0

私はこのxmlを使用しています

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:map="http://schemas.android.com/apk/res-auto"
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment"
    map:cameraBearing="112.5"
    map:cameraTargetLat="34.8545"
    map:cameraTargetLng="37.0261"
    map:cameraTilt="30"
    map:cameraZoom="13"
    map:mapType="normal"
    map:uiCompass="false"
    map:uiRotateGestures="true"
    map:uiScrollGestures="false"
    map:uiTiltGestures="true"
    map:uiZoomControls="false"
    map:uiZoomGestures="true" />

Googleマップを国にズームするのですが、中央に青い線のある画面しか表示されません。何が間違っていますか?

4

2 に答える 2

1

削除map:cameraTilt="30"してmap:cameraBearing="112.5"、何が起こるかを確認してください。

于 2013-06-11T20:34:43.930 に答える
0

xml ファイルで xml コードをテストし、デバイスで正常に実行されましたが、座標が異なります...

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"
map:cameraBearing="112.5"
map:cameraTargetLat="18.5182355"
map:cameraTargetLng="73.8792761"
map:cameraTilt="30"
map:cameraZoom="13"
map:mapType="normal"
map:uiCompass="false"
map:uiRotateGestures="true"
map:uiScrollGestures="false"
map:uiTiltGestures="true"
map:uiZoomControls="false"
map:uiZoomGestures="true" />

表示されている青い線は、間違った緯度経度座標が原因である可能性があります..

于 2013-06-14T13:35:31.953 に答える