本文整理了Java中com.google.android.gms.maps.SupportMapFragment.getMapAsync()
方法的一些代码示例,展示了SupportMapFragment.getMapAsync()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SupportMapFragment.getMapAsync()
方法的具体详情如下:
包路径:com.google.android.gms.maps.SupportMapFragment
类名称:SupportMapFragment
方法名:getMapAsync
暂无
代码示例来源:origin: hussien89aa/AndroidTutorialForBeginners
void LoadMap(){
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
代码示例来源:origin: googlemaps/android-maps-utils
private void setUpMap() {
((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMapAsync(this);
}
代码示例来源:origin: commonsguy/cw-omnibus
private void onCreateForRealz(boolean canGetLocation) {
if (canGetLocation) {
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
mapFrag.getMapAsync(this);
}
}
else if (!isInPermission) {
isInPermission=true;
ActivityCompat.requestPermissions(this,
new String[] {Manifest.permission.ACCESS_FINE_LOCATION},
REQUEST_PERMS);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
mapFrag.getMapAsync(this);
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: facebook/facebook-android-sdk
private void toggleMapAndList() {
state = state == State.MAP ? State.LIST : State.MAP;
if (state == State.LIST) {
if (mapFragment != null) {
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
ft.hide(mapFragment).commit();
}
recyclerView.setVisibility(View.VISIBLE);
currentPlaceCardView.setVisibility(View.VISIBLE);
}
if (state == State.MAP) {
if (mapFragment == null) {
mapFragment = SupportMapFragment.newInstance();
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
transaction.replace(R.id.place_search_map_placeholder, mapFragment);
transaction.commit();
mapFragment.getMapAsync(this);
} else {
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
ft.show(mapFragment).commit();
}
recyclerView.setVisibility(View.INVISIBLE);
currentPlaceCardView.setVisibility(View.INVISIBLE);
}
displayPlaces(placesToDisplay);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
SupportMapFragment mapFrag=
(SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit=true;
}
mapFrag.setRetainInstance(true);
mapFrag.getMapAsync(this);
}
}
代码示例来源:origin: googlemaps/android-samples
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
mSelectedStyleId = savedInstanceState.getInt(SELECTED_STYLE);
}
setContentView(R.layout.styled_map_demo);
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
代码示例来源:origin: googlemaps/android-samples
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Retrieve the content view that renders the map.
setContentView(R.layout.activity_maps_raw);
// Get the SupportMapFragment and register for the callback
// when the map is ready for use.
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
代码示例来源:origin: googlemaps/android-samples
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ground_overlay_demo);
mTransparencyBar = (SeekBar) findViewById(R.id.transparencySeekBar);
mTransparencyBar.setMax(TRANSPARENCY_MAX);
mTransparencyBar.setProgress(0);
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
代码示例来源:origin: googlemaps/android-samples
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.camera_demo);
mAnimateToggle = (CompoundButton) findViewById(R.id.animate);
mCustomDurationToggle = (CompoundButton) findViewById(R.id.duration_toggle);
mCustomDurationBar = (SeekBar) findViewById(R.id.duration_bar);
updateEnabledState();
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
内容来源于网络,如有侵权,请联系作者删除!