Skip to content

Instantly share code, notes, and snippets.

@sbis04

sbis04/main.dart Secret

Created May 30, 2020 09:16
Show Gist options
  • Save sbis04/b2a991dc5d3e4f977565140d668ae7dc to your computer and use it in GitHub Desktop.
Save sbis04/b2a991dc5d3e4f977565140d668ae7dc to your computer and use it in GitHub Desktop.
// Import the Google Maps package
import 'package:google_maps_flutter/google_maps_flutter.dart';
// Initial location of the Map view
CameraPosition _initialLocation = CameraPosition(target: LatLng(0.0, 0.0));
// For controlling the view of the Map
GoogleMapController mapController;
// Replace the "TODO" with this widget
GoogleMap(
initialCameraPosition: _initialLocation,
myLocationEnabled: true,
myLocationButtonEnabled: false,
mapType: MapType.normal,
zoomGesturesEnabled: true,
zoomControlsEnabled: false,
onMapCreated: (GoogleMapController controller) {
mapController = controller;
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment