Skip to content

Instantly share code, notes, and snippets.

@MobileSam
Created October 19, 2017 12:52
Show Gist options
  • Save MobileSam/a737bed509741fbc5866e5393f13d1e2 to your computer and use it in GitHub Desktop.
Save MobileSam/a737bed509741fbc5866e5393f13d1e2 to your computer and use it in GitHub Desktop.
Android Google Map Default Location
LatLng pos = new LatLng(45.50228475740457,-73.60521756257315);
GoogleMapOptions options = new GoogleMapOptions();
options.camera(CameraPosition.fromLatLngZoom(pos, 15.f));
SupportMapFragment supportFragment = SupportMapFragment.newInstance(options);
supportFragment.getMapAsync(this);
activity.getSupportFragmentManager()
.beginTransaction()
.add(R.id.map, supportFragment)
.commitAllowingStateLoss();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment