Skip to content

About

Location tracking demo with Google Maps, geolocator and polyline route drawing.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Google Location — Maps & Tracking

A Flutter project demonstrating Google Maps, device location and route drawing with polylines.


Highlights

  • Google Maps — a full map view with markers, camera control and map styling.
  • Device location — the location package resolves the device's current position and streams updates.
  • Polyline routes — flutter_polyline_points turns a coordinate list into a drawn path between two points.
  • Permission handling — location permission is requested before the map starts tracking.
  • Three focused files — map, tracking and entry point kept separate for clarity.

Tech Stack

Concern Choice
UI Flutter, Material
Maps google_maps_flutter
Location location
Routing flutter_polyline_points

Project Structure

lib/
├── googleMap.dart         # Google Maps view, markers and polylines
├── location_tracking.dart # Location permission and position stream
└── main.dart

Getting Started

Prerequisites

  • Flutter >= 3.16
  • A Google Maps API key with the Maps SDK for Android and iOS enabled
  • minSdkVersion 21 and the Maps renderer requirement in android/app/build.gradle

Add your key to android/app/src/main/AndroidManifest.xml:

<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_API_KEY" />

And to ios/Runner/AppDelegate.swift:

GMSServices.provideAPIKey("YOUR_API_KEY")

Run

git clone https://github.com/developer-rahim/Google-Location.git
cd Google-Location
flutter pub get
flutter run

Test

flutter test
flutter analyze

Notes

  • Google Maps does not render on an Android emulator without a valid API key — the map stays blank.
  • Use a physical device to test real GPS tracking; the emulator returns a simulated location.
  • flutter_polyline_points needs a decoded polyline string. For live routing, decode it from a Directions API response.

License

Released under the MIT License.

About

Location tracking demo with Google Maps, geolocator and polyline route drawing.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages