地理的マーカーを含むマップフラグメントをアプリに追加し、Playサービスジャーを含めましたが、マーカーコードで次のエラーが発生します。
Error: Cannot cast from Fragment to SupportMapFragment
スニペットは次のとおりです。
GoogleMap mMap = ((SupportMapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.addMarker(new MarkerOptions()
.position(new LatLng(53.271900177, -9.04889965057))
.title("GMI alway Location"));;
これは、それを参照するための私のxml宣言です。
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" />
誰かが私がどこで間違っているのかについて何か考えがありますか?ありがとうブライアンJ