google_maps 3.2.2

Dart Google Maps

This project is a library to use Google Maps JavaScript API v3 from dart scripts.

Usage

To use this library in your code:

  • add a dependency in your pubspec.yaml :

    dependencies:
      google_maps: ">=3.0.0 <4.0.0"
    
  • add import in your dart code:

    import 'package:google_maps/google_maps.dart';
    
  • Include the Maps API JavaScript using a script tag before your dart script.

    <script src="https://maps.googleapis.com/maps/api/js?key=API_KEY"></script>
    

Please see the Google Maps JavaScript API v3 Getting Started guide for information about obtaining an API Key.

A very simple example :

import 'dart:html';

import 'package:google_maps/google_maps.dart';

void main() {
  final mapOptions = new MapOptions()
    ..zoom = 8
    ..center = new LatLng(-34.397, 150.644);
  new GMap(document.getElementById("map-canvas"), mapOptions);
}

Coverage

The library covers all Google Maps JavaScript API v3 and its Libraries. To use one or more Google Maps Library:

  • add import in your dart code:

    import 'package:google_maps/google_maps_LIBRARY1.dart';
    import 'package:google_maps/google_maps_LIBRARY2.dart';
    
  • Include the Maps API JavaScript using a script tag.

    <script src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=LIBRARY1,LIBRARY2"></script>
    

Examples

Examples found at https://google-developers.appspot.com/maps/documentation/javascript/examples/ are available in a dart version at https://github.com/a14n/dart-google-maps in the example directory.

License

Apache 2.0

v3.2.2 (2017-08-28)

  • Support some additions from Google Maps API 3.28

v3.2.1 (2017-06-20)

v3.2.0+2 (2017-01-16)

  • fix issue with mirrors and Dart2js (see http://dartbug.com/28371)

v3.2.0+1 (2016-11-16)

  • update to handle stricter markdown

v3.2.0 (2016-11-15)

  • use js_wrapping-0.3.0
  • no more generator dependencies grabbed

v3.1.0 (2015-12-17)

  • support of the Google Maps API 3.22

v3.0.2 (2015-06-16)

v3.0.1 (2015-06-12)

v3.0.0 (2015-06-05)

  • support of the Google Maps API 3.20
  • migration to js_wrapping-0.2.0

Semantic Version Conventions

http://semver.org/

  • Stable: All even numbered minor versions are considered API stable: i.e.: v1.0.x, v1.2.x, and so on.
  • Development: All odd numbered minor versions are considered API unstable: i.e.: v0.9.x, v1.1.x, and so on.

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  google_maps: "^3.2.2"

2. Install it

You can install packages from the command line:

$ pub get

Alternatively, your editor might support 'pub get'. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:google_maps/google_maps.dart';

Platforms

Web

About

With that package you will be able to use Google Maps JavaScript API from Dart scripts.

Author

Email alexandre.ardhuin@gmail.com Alexandre Ardhuin

Homepage

github.com/a14n/dart-google-maps

Documentation

www.dartdocs.org/documentation/google_maps/3.2.2/

Uploader

alexandre.ardhuin@gmail.com

Published

Aug 28, 2017

Share