本文整理汇总了Java中com.google.android.gms.maps.GoogleMapOptions类的典型用法代码示例。如果您正苦于以下问题:Java GoogleMapOptions类的具体用法?Java GoogleMapOptions怎么用?Java GoogleMapOptions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GoogleMapOptions类属于com.google.android.gms.maps包,在下文中一共展示了GoogleMapOptions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newMapFragment
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
private static SupportMapFragment newMapFragment() {
return SupportMapFragment.newInstance(new GoogleMapOptions()
.camera(new CameraPosition.Builder()
.target(LocationAdapter.ZERO)
.zoom(DEFAULT_ZOOM)
.build()));
}
示例2: inflateSupportMapFragment
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public SupportMapFragment inflateSupportMapFragment() {
FragmentManager fragmentManager = getChildFragmentManager();
SupportMapFragment mapFragment = (SupportMapFragment) fragmentManager.findFragmentById(R.id.maps_container);
if (mapFragment == null) {
CameraPosition cameraPosition = CameraPosition.builder()
.target(new LatLng(10.7473821, 106.6805755))
.zoom(16)
.build();
GoogleMapOptions options = new GoogleMapOptions();
options.mapType(GoogleMap.MAP_TYPE_NORMAL)
.camera(cameraPosition)
.compassEnabled(true)
.rotateGesturesEnabled(true)
.zoomGesturesEnabled(true)
.tiltGesturesEnabled(true);
mapFragment = SupportMapFragment.newInstance(options);
fragmentManager.beginTransaction().replace(R.id.map_placeholder, mapFragment).commit();
fragmentManager.executePendingTransactions();
}
return mapFragment;
}
示例3: setupMap
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
protected void setupMap(){
// GoogleMapOptions to Set Map to Lite Mode
GoogleMapOptions googleMapOptions = new GoogleMapOptions().liteMode(true);
mMapView = new MapView(this, googleMapOptions);
mMapView.setClickable(false);
mMapView.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
mMapView.setMinimumHeight(MAP_HEIGHT);
mMapContainer.addView(mMapView);
mMapContainer.setMinimumHeight(MAP_HEIGHT);
mMapView.onCreate(null);
mMapView.onResume();
mMapView.getMapAsync(this);
}
示例4: GoogleMapImpl
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
private GoogleMapImpl(Context context, GoogleMapOptions options) {
this.context = context;
Context appContext = context;
if (appContext.getApplicationContext() != null)
appContext = appContext.getApplicationContext();
Context wrappedContext = ApplicationContextWrapper.gmsContextWithAttachedApplicationContext(appContext);
backendMap = new BackendMap(wrappedContext, this);
uiSettings = new UiSettingsImpl(this);
projection = new ProjectionImpl(backendMap.getViewport());
this.options = options;
criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_COARSE);
criteria.setPowerRequirement(Criteria.POWER_MEDIUM);
if (options != null) initFromOptions();
}
示例5: getDefaultMapOptions
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static Bundle getDefaultMapOptions(IMapManager mapManager) {
Bundle b = new Bundle();
GoogleMapOptions gmo = new GoogleMapOptions().compassEnabled(true);
boolean lateInit = false;
if (mapManager != null) {
MapConfig mapConfig = mapManager.getMapConfigCached();
if (mapConfig != null) {
de.rallye.model.structures.LatLng loc = mapConfig.location;
gmo.camera(new CameraPosition(LatLngAdapter.toGms(loc), mapConfig.zoomLevel, 0, 0));
} else {
lateInit = true;
mapManager.updateMapConfig();
}
} else {
lateInit = true;
}
b.putBoolean(Std.LATE_INITIALIZATION, lateInit);
b.putParcelable(Std.GOOGLE_MAPS_OPTIONS, gmo);
return b;
}
示例6: createMap
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
private SupportMapFragment createMap()
{
GoogleMapOptions options = new GoogleMapOptions();
options.useViewLifecycleInFragment( true );
options.compassEnabled( false );
options.zoomControlsEnabled( false );
final boolean mapControlEnabled = true;
options.zoomGesturesEnabled( mapControlEnabled );
options.scrollGesturesEnabled( mapControlEnabled );
options.rotateGesturesEnabled( mapControlEnabled );
options.tiltGesturesEnabled( mapControlEnabled );
options.mapType( GoogleMap.MAP_TYPE_SATELLITE );
CameraPosition camPos = new CameraPosition( DEFAULT_LOCATION, 0.0f, 30f, 0.0f );
options.camera( camPos );
SupportMapFragment mapFragment = SupportMapFragment.newInstance( options );
return mapFragment;
}
示例7: createMap
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
private MapFragment createMap()
{
GoogleMapOptions options = new GoogleMapOptions();
options.useViewLifecycleInFragment( true );
options.compassEnabled( false );
options.zoomControlsEnabled( false );
final boolean mapControlEnabled = geMapControlsEnabled();
options.zoomGesturesEnabled( mapControlEnabled );
options.scrollGesturesEnabled( mapControlEnabled );
options.rotateGesturesEnabled( mapControlEnabled );
options.tiltGesturesEnabled( mapControlEnabled );
options.mapType( GoogleMap.MAP_TYPE_SATELLITE );
CameraPosition camPos = new CameraPosition( getLocation(), 0.0f, 30f, 0.0f );
options.camera( camPos );
MapFragment mapFragment = MapFragment.newInstance( options );
return mapFragment;
}
示例8: newInstance
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static MapFragment newInstance(GoogleMapOptions options) {
MapFragment f = new MapFragment();
Bundle args = new Bundle();
args.putParcelable(MAP_OPTIONS, options);
f.setArguments(args);
return f;
}
示例9: newInstance
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static SupportMapFragment newInstance(GoogleMapOptions options) {
SupportMapFragment f = new SupportMapFragment();
Bundle args = new Bundle();
args.putParcelable(MAP_OPTIONS, options);
f.setArguments(args);
return f;
}
示例10: newInstance
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static SupportMapFragment newInstance(double lat, double lng) {
GoogleMapOptions options = new GoogleMapOptions();
options.compassEnabled(true);
options.mapType(GoogleMap.MAP_TYPE_NORMAL);
MapFragment mapFragment = new MapFragment();
Bundle bundle = new Bundle();
bundle.putParcelable("MapOptions", options);
mapFragment.setArguments(bundle);
mapFragment.getMapAsync(mapFragment);
mapFragment.mLat = lat;
mapFragment.mLng = lng;
mapFragment.setRetainInstance(true);
return mapFragment;
}
示例11: a
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public final void a(Activity paramActivity, Bundle paramBundle1, Bundle paramBundle2)
{
GoogleMapOptions localGoogleMapOptions = (GoogleMapOptions)paramBundle1.getParcelable("MapOptions");
try
{
this.a.a(new evc(paramActivity), localGoogleMapOptions, paramBundle2);
return;
}
catch (RemoteException localRemoteException)
{
throw new bm(localRemoteException);
}
}
示例12: a
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static fev a(GoogleMapOptions paramGoogleMapOptions)
{
fev localfev = new fev();
Bundle localBundle = new Bundle();
localBundle.putParcelable("MapOptions", paramGoogleMapOptions);
localfev.f(localBundle);
return localfev;
}
示例13: build
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
/**
* Build the map fragment with the requested options
*
* @return The {@link NativeGoogleMapFragment} map fragment.
*/
@Override public NativeGoogleMapFragment build() {
if (options == null) {
options = new AirGoogleMapOptions(new GoogleMapOptions());
}
return NativeGoogleMapFragment.newInstance(options);
}
示例14: newInstance
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
public static RequestMapFragment newInstance(GoogleMapOptions options, String title) {
RequestMapFragment fragment = new RequestMapFragment();
Bundle args = new Bundle();
args.putParcelable("MapOptions", options); //obtained by decompiling google-play-services.jar
args.putString("title", title);
fragment.setArguments(args);
return fragment;
}
示例15: onCreate
import com.google.android.gms.maps.GoogleMapOptions; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_request_walk);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
pager = (ViewPager) findViewById(R.id.pager);
mAdapter = new FragmentAdapter(this, pager);
titleindicator = (TitlePageIndicator) findViewById(R.id.titles);
prevButton = (Button) findViewById(R.id.prev_button);
nextButton = (Button) findViewById(R.id.next_button);
titleindicator.setViewPager(pager);
titleindicator.setOnTouchListener(null);
titleindicator.setOnClickListener(null);
titleindicator.setOnPageChangeListener(mAdapter);
prevButton.setEnabled(false);
nextButton.setEnabled(false);
mAdapter.addFragment(InfoFragment.newInstance("Information"));
mAdapter.addFragment(LocationFragment.newInstance("Location"));
mAdapter.addFragment(RequestMapFragment.newInstance(new GoogleMapOptions(), "Destination"));
mAdapter.addFragment(ReviewFragment.newInstance("Review"));
initializePageListeners(pager, prevButton, nextButton);
pager.setOffscreenPageLimit(mAdapter.getCount() - 1);
mParseHandler = new ParseHandler(this);
mParseHandler.initializeParse();
walkRequest = new WalkRequest();
}