マップ フラグメントにマーカーを実装しましたが、デバイスでアプリを実行すると、マップ フラグメントが灰色で表示されます。マーカーと地理的位置が表示されるはずです。サポートされているか、デバッグ キーに問題があります。また、コードの実装に問題がある可能性はありますか?
public class MapGmit extends FragmentActivity implements OnGestureListener
{
private static final int MAJOR_MOVE = 0;
//MapView map;
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map_gmit);
/*map = (MapView)findViewById(R.id.map);
map.setBuiltInZoomControls(true);*/
//code to add a map marker at GMIT geographic location
GoogleMap mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.addMarker(new MarkerOptions()
.position(new LatLng(53.271900177, -9.04889965057))
.title("GMIT Galway Location"));;
}
}