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; }
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); }
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(); }
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; }
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; }
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; }
private static SupportMapFragment newMapFragment() { return SupportMapFragment.newInstance(new GoogleMapOptions() .camera(new CameraPosition.Builder() .target(LocationAdapter.ZERO) .zoom(DEFAULT_ZOOM) .build())); }
public static MapFragment newInstance(GoogleMapOptions options) { MapFragment f = new MapFragment(); Bundle args = new Bundle(); args.putParcelable(MAP_OPTIONS, options); f.setArguments(args); return f; }
public static SupportMapFragment newInstance(GoogleMapOptions options) { SupportMapFragment f = new SupportMapFragment(); Bundle args = new Bundle(); args.putParcelable(MAP_OPTIONS, options); f.setArguments(args); return f; }
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; }
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); } }
public static fev a(GoogleMapOptions paramGoogleMapOptions) { fev localfev = new fev(); Bundle localBundle = new Bundle(); localBundle.putParcelable("MapOptions", paramGoogleMapOptions); localfev.f(localBundle); return localfev; }
public final void a(Activity paramActivity, AttributeSet paramAttributeSet, Bundle paramBundle) { super.a(paramActivity, paramAttributeSet, paramBundle); fey localfey1 = this.a; localfey1.d = paramActivity; localfey1.a(); GoogleMapOptions localGoogleMapOptions = GoogleMapOptions.a(paramActivity, paramAttributeSet); Bundle localBundle = new Bundle(); localBundle.putParcelable("MapOptions", localGoogleMapOptions); fey localfey2 = this.a; localfey2.a(paramBundle, new eut(localfey2, paramActivity, localBundle, paramBundle)); }
/** * 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); }
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; }
@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(); }
@Override public void onCreate(Bundle savedInstanceState) throws RemoteException { Log.d(TAG, "onCreate"); //myMap().onCreate(savedInstanceState); // TOOD: Certainly does not belong here and this way Bundle mapState = savedInstanceState.getBundle("map_state"); if (mapState != null) { mapState.setClassLoader(GoogleMapOptions.class.getClassLoader()); GoogleMapOptions options = mapState.getParcelable("MapOptions"); if (options != null) this.options = options; } }
/** * Create a GoogleMapFragment with the given options. * * @param options * @return GoogleMapFragment */ public static GoogleMapFragment newInstance(GoogleMapOptions options) { Bundle arguments = new Bundle(); arguments.putParcelable(SUPPORT_MAP_BUNDLE_KEY, options); GoogleMapFragment fragment = new GoogleMapFragment(); fragment.setArguments(arguments); return fragment; }
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setHasOptionsMenu(true); GoogleMapOptions op = new GoogleMapOptions(); op.zOrderOnTop(true); this.newInstance(op); }
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); FragmentManager fm = getChildFragmentManager(); fragment = (SupportMapFragment) fm.findFragmentById(R.id.map); if (fragment == null) { Log.v(LOG_TAG, "The fragment was null. Retrieving a new support map fragment"); // If the users position is known at this point, create the map with the new // position myActualPosition = onPositionRequestedListener.requestPosition(); if (myActualPosition != null) { CameraPosition cameraPosition = new CameraPosition.Builder() .target(myActualPosition) .zoom(DEFAULT_ZOOM_LEVEL) .build(); GoogleMapOptions googleOptions = new GoogleMapOptions() .camera(cameraPosition); fragment = SupportMapFragment.newInstance(googleOptions); isUserPositionSet = true; } else { fragment = SupportMapFragment.newInstance(); } fm.beginTransaction().replace(R.id.map, fragment).commit(); } }
public static FloorFragment newInstance(GoogleMapOptions options) { Bundle arguments = new Bundle(); arguments.putParcelable(SUPPORT_MAP_BUNDLE_KEY, options); FloorFragment fragment = new FloorFragment(); fragment.setArguments(arguments); return fragment; }
public final m a(af paramaf, GoogleMapOptions paramGoogleMapOptions) { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.ICreator"); IBinder localIBinder; if (paramaf != null) { localIBinder = paramaf.asBinder(); localParcel1.writeStrongBinder(localIBinder); if (paramGoogleMapOptions == null) break label96; localParcel1.writeInt(1); paramGoogleMapOptions.writeToParcel(localParcel1, 0); } while (true) { this.a.transact(3, localParcel1, localParcel2, 0); localParcel2.readException(); m localm = n.a(localParcel2.readStrongBinder()); return localm; localIBinder = null; break; label96: localParcel1.writeInt(0); } } finally { localParcel2.recycle(); localParcel1.recycle(); } }
public ScrollFriendlyMapView(Context context, GoogleMapOptions googleMapOptions) { super(context, googleMapOptions); }
public MapView(Context context, GoogleMapOptions options) { super(context, options); }
public CustomMapView(Context context, GoogleMapOptions options) { super(context, options); }
public ScrollableMapView(Context context, GoogleMapOptions options) { super(context, options); }
public SquareMap(Context context, GoogleMapOptions googleMapOptions) { super(context, googleMapOptions); }
public final fxh a(boolean paramBoolean) { GoogleMapOptions localGoogleMapOptions = new GoogleMapOptions(); localGoogleMapOptions.j = Boolean.valueOf(false); return new fxl(fev.a(localGoogleMapOptions)); }
public final ffm a(euz parameuz, GoogleMapOptions paramGoogleMapOptions) { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); for (;;) { IBinder localIBinder2; Object localObject2; try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.ICreator"); IBinder localIBinder1; if (parameuz != null) { localIBinder1 = parameuz.asBinder(); localParcel1.writeStrongBinder(localIBinder1); if (paramGoogleMapOptions != null) { localParcel1.writeInt(1); paramGoogleMapOptions.writeToParcel(localParcel1, 0); this.a.transact(3, localParcel1, localParcel2, 0); localParcel2.readException(); localIBinder2 = localParcel2.readStrongBinder(); localObject2 = null; if (localIBinder2 != null) { break label123; } return localObject2; } } else { localIBinder1 = null; continue; } localParcel1.writeInt(0); continue; localIInterface = localIBinder2.queryLocalInterface("com.google.android.gms.maps.internal.IMapViewDelegate"); } finally { localParcel2.recycle(); localParcel1.recycle(); } label123: IInterface localIInterface; if ((localIInterface != null) && ((localIInterface instanceof ffm))) { localObject2 = (ffm)localIInterface; } else { localObject2 = new ffo(localIBinder2); } } }
public final void a(euz parameuz, GoogleMapOptions paramGoogleMapOptions, Bundle paramBundle) { Parcel localParcel1 = Parcel.obtain(); Parcel localParcel2 = Parcel.obtain(); label132: for (;;) { try { localParcel1.writeInterfaceToken("com.google.android.gms.maps.internal.IMapFragmentDelegate"); IBinder localIBinder; if (parameuz != null) { localIBinder = parameuz.asBinder(); localParcel1.writeStrongBinder(localIBinder); if (paramGoogleMapOptions != null) { localParcel1.writeInt(1); paramGoogleMapOptions.writeToParcel(localParcel1, 0); if (paramBundle == null) { break label132; } localParcel1.writeInt(1); paramBundle.writeToParcel(localParcel1, 0); this.a.transact(2, localParcel1, localParcel2, 0); localParcel2.readException(); } } else { localIBinder = null; continue; } localParcel1.writeInt(0); continue; localParcel1.writeInt(0); } finally { localParcel2.recycle(); localParcel1.recycle(); } } }
/** * Manipulates the map once available. * This callback is triggered when the map is ready to be used. * If Google Play services is not installed on the device, the user will be prompted to install * it inside the SupportMapFragment. This method will only be triggered once the user has * installed Google Play services and returned to the app. */ @Override public void onMapReady(GoogleMap googleMap) { map = googleMap; if (map == null) return; map.setMapStyle(MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.map_style)); map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(22.3964, 114.1095), 10)); GoogleMapOptions options = new GoogleMapOptions(); options.mapToolbarEnabled(false); options.compassEnabled(true); options.rotateGesturesEnabled(true); options.scrollGesturesEnabled(false); options.tiltGesturesEnabled(true); options.zoomControlsEnabled(false); options.zoomGesturesEnabled(true); map.setBuildingsEnabled(false); map.setIndoorEnabled(false); map.setTrafficEnabled(false); map.setOnMarkerClickListener(this); if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) { map.setMyLocationEnabled(true); } if (busRouteStops != null && busRouteStops.size() > 0) { PolylineOptions line = new PolylineOptions().width(20).zIndex(1) .color(ContextCompat.getColor(getContext(), R.color.colorAccent)); for (BusRouteStop stop: busRouteStops) { LatLng latLng = new LatLng(Double.parseDouble(stop.latitude), Double.parseDouble(stop.longitude)); line.add(latLng); IconGenerator iconFactory = new IconGenerator(getContext()); Bitmap bmp = iconFactory.makeIcon(stop.sequence + ": " + stop.name); map.addMarker(new MarkerOptions().position(latLng) .icon(BitmapDescriptorFactory.fromBitmap(bmp))).setTag(stop); } line.startCap(new RoundCap()); line.endCap(new RoundCap()); map.addPolyline(line); if (busRouteStops.size() < goToStopPos) { goToStopPos = 0; } map.moveCamera(CameraUpdateFactory.newLatLngZoom( new LatLng(Double.parseDouble(busRouteStops.get(goToStopPos).latitude), Double.parseDouble(busRouteStops.get(goToStopPos).longitude)), 16)); } }
public AirGoogleMapOptions(GoogleMapOptions options) { this.options = options; }
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2) { switch (paramInt1) { default: break; case 1598968902: paramParcel2.writeString("com.google.android.gms.maps.internal.ICreator"); return true; case 1: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); e(b.a.E(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); return true; case 2: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); IMapFragmentDelegate localIMapFragmentDelegate = f(b.a.E(paramParcel1.readStrongBinder())); paramParcel2.writeNoException(); IBinder localIBinder4; if (localIMapFragmentDelegate != null) localIBinder4 = localIMapFragmentDelegate.asBinder(); else localIBinder4 = null; paramParcel2.writeStrongBinder(localIBinder4); return true; case 3: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); b localb = b.a.E(paramParcel1.readStrongBinder()); GoogleMapOptions localGoogleMapOptions; if (paramParcel1.readInt() != 0) localGoogleMapOptions = GoogleMapOptions.CREATOR.createFromParcel(paramParcel1); else localGoogleMapOptions = null; IMapViewDelegate localIMapViewDelegate = a(localb, localGoogleMapOptions); paramParcel2.writeNoException(); IBinder localIBinder3; if (localIMapViewDelegate != null) localIBinder3 = localIMapViewDelegate.asBinder(); else localIBinder3 = null; paramParcel2.writeStrongBinder(localIBinder3); return true; case 4: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); ICameraUpdateFactoryDelegate localICameraUpdateFactoryDelegate = ez(); paramParcel2.writeNoException(); IBinder localIBinder2; if (localICameraUpdateFactoryDelegate != null) localIBinder2 = localICameraUpdateFactoryDelegate.asBinder(); else localIBinder2 = null; paramParcel2.writeStrongBinder(localIBinder2); return true; case 5: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); a locala = eA(); paramParcel2.writeNoException(); IBinder localIBinder1; if (locala != null) localIBinder1 = locala.asBinder(); else localIBinder1 = null; paramParcel2.writeStrongBinder(localIBinder1); return true; case 6: paramParcel1.enforceInterface("com.google.android.gms.maps.internal.ICreator"); a(b.a.E(paramParcel1.readStrongBinder()), paramParcel1.readInt()); paramParcel2.writeNoException(); return true; } return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2); }
public MapViewImpl(Context context, GoogleMapOptions options) { this.context = context; this.options = options; }
public synchronized static GoogleMapImpl create(Context context, GoogleMapOptions options) { return new GoogleMapImpl(context, options); }
@Override public void onInflate(IObjectWrapper activity, GoogleMapOptions options, Bundle savedInstanceState) throws RemoteException { if (options != null) this.options = options; Log.d(TAG, "onInflate"); }
@Override public IMapViewDelegate newMapViewDelegate(IObjectWrapper context, GoogleMapOptions options) throws RemoteException { return new MapViewImpl((Context) ObjectWrapper.unwrap(context), options); }