当前位置: 首页>>代码示例>>Java>>正文


Java GoogleMapOptions类代码示例

本文整理汇总了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()));
}
 
开发者ID:ArnauBlanch,项目名称:civify-app,代码行数:8,代码来源:CivifyMap.java

示例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;
}
 
开发者ID:HCMUS-AssignmentWarehouse,项目名称:FastFoodFinder,代码行数:23,代码来源:MainMapFragment.java

示例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);
}
 
开发者ID:foxtrot94,项目名称:DotHike,代码行数:20,代码来源:ResultsActivity.java

示例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();
}
 
开发者ID:microg,项目名称:android_packages_apps_GmsCore,代码行数:18,代码来源:GoogleMapImpl.java

示例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;
}
 
开发者ID:jakobwenzel,项目名称:rallye-android-client,代码行数:25,代码来源:Util.java

示例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;
}
 
开发者ID:Wavesonics,项目名称:TMinus,代码行数:24,代码来源:LocationBrowserFragment.java

示例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;
}
 
开发者ID:Wavesonics,项目名称:TMinus,代码行数:24,代码来源:LocationDetailFragment.java

示例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;
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:8,代码来源:MapFragment.java

示例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;
}
 
开发者ID:mosquitolabs,项目名称:referendum_1o_android,代码行数:8,代码来源:SupportMapFragment.java

示例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;
}
 
开发者ID:ForrestFalcon,项目名称:fAlarm,代码行数:16,代码来源:MapFragment.java

示例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);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:few.java

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:9,代码来源:fev.java

示例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);
}
 
开发者ID:airbnb,项目名称:AirMapView,代码行数:12,代码来源:NativeAirMapViewBuilder.java

示例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;
  }
 
开发者ID:hzsweers,项目名称:SUREwalk_android,代码行数:11,代码来源:RequestMapFragment.java

示例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();
}
 
开发者ID:hzsweers,项目名称:SUREwalk_android,代码行数:36,代码来源:RequestWalkActivity.java


注:本文中的com.google.android.gms.maps.GoogleMapOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。