google_maps
8.3.0, released 4 months ago by an unverified publisher
Use the Google Maps JavaScript API directly from Dart scripts.
What it does
Provides a Dart wrapper for the Google Maps JavaScript API v3, allowing developers to interact with maps, markers, and services entirely through Dart. It covers the full API and its additional libraries using wasm-safe JS-interop via package:web.
AI-written summary of version 8.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a web application in Dart and want direct access to the Google Maps JavaScript API.
- You need comprehensive coverage of all Google Maps JavaScript libraries.
Skip it when
- You are building a mobile-first app using Flutter (use google_maps_flutter instead).
- You prefer a declarative Flutter widget approach over dealing with raw JavaScript bindings and HTML elements.
Strengths
- Covers all Google Maps JavaScript API v3 features and libraries.
- Migrated to wasm-safe JS-interop using package:web.
- Actively updated against official Google Maps documentation.
Weaknesses
- Designed specifically for web/Dart scripts, not native Flutter mobile widgets.
- Requires manual inclusion of the Google Maps JavaScript script tag in HTML.
- Does not support alpha or beta elements/libraries.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add the package dependency and include the Google Maps JavaScript API script tag with your API key in your HTML file.
import 'package:google_maps/google_maps.dart';
import 'package:web/web.dart';
void main() {
final mapOptions = MapOptions()
..zoom = 8
..center = LatLng(-34.397, 150.644);
GMap(document.getElementById('map-canvas') as HTMLElement, mapOptions);
}Alternatives
Packages that do the same job and could replace google_maps.
- google_maps_flutter_android
Android implementation of the google_maps_flutter plugin.
82Compare - google_maps_flutter_ios
iOS implementation of the google_maps_flutter plugin.
81Compare - google_maps_flutter
A Flutter plugin for integrating Google Maps in Android, iOS, and web applications.
90Compare - google_maps_flutter_ios_sdk10
iOS implementation of the google_maps_flutter plugin using Google Maps SDK 10.
77Compare
Works with
Packages commonly used together with google_maps: ones it builds on, ones built on it, and its own family.
- webgoogle_maps depends on itLightweight bindings for browser APIs via JS interop
- google_maps_flutter_webBuilt on google_mapsWeb platform implementation of google_maps_flutter.
- flutter_google_street_viewBuilt on google_mapsA Flutter plugin providing Google Street View for Web, iOS, and Android applications.