google_maps 3.2.4

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 89

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.4 (2018-04-11)

  • Fix another issue with Dart-2

v3.2.3 (2018-04-07)

  • Fix some issue with Dart-2

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)

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.

Use this package as a library

1. Depend on it

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


dependencies:
  google_maps: "^3.2.4"

2. Install it

You can install packages from the command line:

with pub:


$ 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';
  
Version Uploaded Documentation Archive
3.2.4 Apr 11, 2018 Go to the documentation of google_maps 3.2.4 Download google_maps 3.2.4 archive
3.2.3 Apr 7, 2018 Go to the documentation of google_maps 3.2.3 Download google_maps 3.2.3 archive
3.2.2 Aug 28, 2017 Go to the documentation of google_maps 3.2.2 Download google_maps 3.2.2 archive
3.2.1 Jun 20, 2017 Go to the documentation of google_maps 3.2.1 Download google_maps 3.2.1 archive
3.2.0+2 Jan 16, 2017 Go to the documentation of google_maps 3.2.0+2 Download google_maps 3.2.0+2 archive
3.2.0+1 Nov 16, 2016 Go to the documentation of google_maps 3.2.0+1 Download google_maps 3.2.0+1 archive
3.2.0 Nov 15, 2016 Go to the documentation of google_maps 3.2.0 Download google_maps 3.2.0 archive
3.1.0 Dec 17, 2015 Go to the documentation of google_maps 3.1.0 Download google_maps 3.1.0 archive
3.0.2 Jun 16, 2015 Go to the documentation of google_maps 3.0.2 Download google_maps 3.0.2 archive
3.0.1 Jun 12, 2015 Go to the documentation of google_maps 3.0.1 Download google_maps 3.0.1 archive

All 40 versions...

Analysis

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status tool failures using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
88 / 100
Health:
Code health derived from static analysis. [more]
98 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
77 / 100
Overall score:
Weighted score of the above. [more]
89
Learn more about scoring.

Platforms

Detected platforms: unsure

Error(s) prevent platform classification:

Make sure dartfmt runs.

Suggestions

  • Make sure dartfmt runs.

    Running dartfmt -n . failed with the following output:

    dartfmt on lib/ failed with exit code -15
    Exceeded timeout of 0:02:00.000000
    
  • Fix platform conflicts.

    Error(s) prevent platform classification:

    Make sure dartfmt runs.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 264 hints.

    Run dartfmt to format lib/google_maps.dart.

    Run dartfmt to format lib/google_maps_adsense.dart.

    Similar analysis of the following files failed:

    • lib/google_maps_drawing.dart (hint)
    • lib/google_maps_geometry.dart (hint)
    • lib/google_maps_panoramio.dart (hint)
    • lib/google_maps_places.dart (hint)
    • lib/google_maps_visualization.dart (hint)
    • lib/google_maps_weather.dart (hint)
    • lib/src/core/base/lat_lng.dart (hint)
    • lib/src/core/base/lat_lng_bounds.dart (hint)
    • lib/src/core/base/lat_lng_bounds_literal.dart (hint)
    • lib/src/core/base/lat_lng_literal.dart (hint)
    • lib/src/core/base/point.dart (hint)
    • lib/src/core/base/size.dart (hint)
    • lib/src/core/controls/control_position.dart (hint)
    • lib/src/core/controls/fullscreen_control_options.dart (hint)
    • lib/src/core/controls/map_type_control_options.dart (hint)
    • lib/src/core/controls/map_type_control_style.dart (hint)
    • lib/src/core/controls/overview_map_control_options.dart (hint)
    • lib/src/core/controls/pan_control_options.dart (hint)
    • lib/src/core/controls/rotate_control_options.dart (hint)
    • lib/src/core/controls/scale_control_options.dart (hint)
    • lib/src/core/controls/scale_control_style.dart (hint)
    • lib/src/core/controls/street_view_control_options.dart (hint)
    • lib/src/core/controls/zoom_control_options.dart (hint)
    • lib/src/core/controls/zoom_control_style.dart (hint)
    • lib/src/core/data/data.dart (hint)
    • lib/src/core/data/data_add_feature_event.dart (hint)
    • lib/src/core/data/data_data_options.dart (hint)
    • lib/src/core/data/data_feature.dart (hint)
    • lib/src/core/data/data_feature_options.dart (hint)
    • lib/src/core/data/data_geo_json_options.dart (hint)
    • lib/src/core/data/data_geometry.dart (hint)
    • lib/src/core/data/data_geometry_collection.dart (hint)
    • lib/src/core/data/data_line_string.dart (hint)
    • lib/src/core/data/data_linear_ring.dart (hint)
    • lib/src/core/data/data_mouse_event.dart (hint)
    • lib/src/core/data/data_multi_line_string.dart (hint)
    • lib/src/core/data/data_multi_point.dart (hint)
    • lib/src/core/data/data_multi_polygon.dart (hint)
    • lib/src/core/data/data_point.dart (hint)
    • lib/src/core/data/data_polygon.dart (hint)
    • lib/src/core/data/data_remove_feature_event.dart (hint)
    • lib/src/core/data/data_remove_property_event.dart (hint)
    • lib/src/core/data/data_set_geometry_event.dart (hint)
    • lib/src/core/data/data_set_property_event.dart (hint)
    • lib/src/core/data/data_style_options.dart (hint)
    • lib/src/core/data/data_styling_function.dart (hint)
    • lib/src/core/events/event.dart (hint)
    • lib/src/core/events/maps_event_listener.dart (hint)
    • lib/src/core/events/mouse_event.dart (hint)
    • lib/src/core/layers/bicycling_layer.dart (hint)
    • lib/src/core/layers/fusion_tables_cell.dart (hint)
    • lib/src/core/layers/fusion_tables_heatmap.dart (hint)
    • lib/src/core/layers/fusion_tables_layer.dart (hint)
    • lib/src/core/layers/fusion_tables_layer_options.dart (hint)
    • lib/src/core/layers/fusion_tables_marker_options.dart (hint)
    • lib/src/core/layers/fusion_tables_mouse_event.dart (hint)
    • lib/src/core/layers/fusion_tables_polygon_options.dart (hint)
    • lib/src/core/layers/fusion_tables_polyline_options.dart (hint)
    • lib/src/core/layers/fusion_tables_query.dart (hint)
    • lib/src/core/layers/fusion_tables_style.dart (hint)
    • lib/src/core/layers/kml_author.dart (hint)
    • lib/src/core/layers/kml_feature_data.dart (hint)
    • lib/src/core/layers/kml_layer.dart (hint)
    • lib/src/core/layers/kml_layer_metadata.dart (hint)
    • lib/src/core/layers/kml_layer_options.dart (hint)
    • lib/src/core/layers/kml_layer_status.dart (hint)
    • lib/src/core/layers/kml_mouse_event.dart (hint)
    • lib/src/core/layers/traffic_layer.dart (hint)
    • lib/src/core/layers/transit_layer.dart (hint)
    • lib/src/core/map/map.dart (hint)
    • lib/src/core/map/map_options.dart (hint)
    • lib/src/core/map/map_type_id.dart (hint)
    • lib/src/core/map_types/image_map_type.dart (hint)
    • lib/src/core/map_types/image_map_type_options.dart (hint)
    • lib/src/core/map_types/map_type.dart (hint)
    • lib/src/core/map_types/map_type_registry.dart (hint)
    • lib/src/core/map_types/map_type_style.dart (hint)
    • lib/src/core/map_types/map_type_style_element_type.dart (hint)
    • lib/src/core/map_types/map_type_style_feature_type.dart (hint)
    • lib/src/core/map_types/map_type_styler.dart (hint)
    • lib/src/core/map_types/projection.dart (hint)
    • lib/src/core/map_types/styled_map_type.dart (hint)
    • lib/src/core/map_types/styled_map_type_options.dart (hint)
    • lib/src/core/mvc/mvcarray.dart (hint)
    • lib/src/core/mvc/mvcobject.dart (hint)
    • lib/src/core/overlays/animation.dart (hint)
    • lib/src/core/overlays/circle.dart (hint)
    • lib/src/core/overlays/circle_options.dart (hint)
    • lib/src/core/overlays/ground_overlay.dart (hint)
    • lib/src/core/overlays/ground_overlay_options.dart (hint)
    • lib/src/core/overlays/icon.dart (hint)
    • lib/src/core/overlays/icon_sequence.dart (hint)
    • lib/src/core/overlays/info_window.dart (hint)
    • lib/src/core/overlays/info_window_options.dart (hint)
    • lib/src/core/overlays/map_canvas_projection.dart (hint)
    • lib/src/core/overlays/map_panes.dart (hint)
    • lib/src/core/overlays/marker.dart (hint)
    • lib/src/core/overlays/marker_label.dart (hint)
    • lib/src/core/overlays/marker_options.dart (hint)
    • lib/src/core/overlays/marker_shape.dart (hint)
    • lib/src/core/overlays/overlay_view.dart (hint)
    • lib/src/core/overlays/poly_mouse_event.dart (hint)
    • lib/src/core/overlays/polygon.dart (hint)
    • lib/src/core/overlays/polygon_options.dart (hint)
    • lib/src/core/overlays/polyline.dart (hint)
    • lib/src/core/overlays/polyline_options.dart (hint)
    • lib/src/core/overlays/rectangle.dart (hint)
    • lib/src/core/overlays/rectangle_options.dart (hint)
    • lib/src/core/overlays/stroke_position.dart (hint)
    • lib/src/core/overlays/symbol.dart (hint)
    • lib/src/core/overlays/symbol_path.dart (hint)
    • lib/src/core/save_to_google_maps/attribution.dart (hint)
    • lib/src/core/save_to_google_maps/marker_place.dart (hint)
    • lib/src/core/save_to_google_maps/save_widget.dart (hint)
    • lib/src/core/save_to_google_maps/save_widget_options.dart (hint)
    • lib/src/core/services/directions_geocoded_waypoint.dart (hint)
    • lib/src/core/services/directions_leg.dart (hint)
    • lib/src/core/services/directions_renderer.dart (hint)
    • lib/src/core/services/directions_renderer_options.dart (hint)
    • lib/src/core/services/directions_request.dart (hint)
    • lib/src/core/services/directions_result.dart (hint)
    • lib/src/core/services/directions_route.dart (hint)
    • lib/src/core/services/directions_service.dart (hint)
    • lib/src/core/services/directions_status.dart (hint)
    • lib/src/core/services/directions_step.dart (hint)
    • lib/src/core/services/directions_waypoint.dart (hint)
    • lib/src/core/services/distance.dart (hint)
    • lib/src/core/services/distance_matrix_element_status.dart (hint)
    • lib/src/core/services/distance_matrix_request.dart (hint)
    • lib/src/core/services/distance_matrix_response.dart (hint)
    • lib/src/core/services/distance_matrix_response_element.dart (hint)
    • lib/src/core/services/distance_matrix_response_row.dart (hint)
    • lib/src/core/services/distance_matrix_service.dart (hint)
    • lib/src/core/services/distance_matrix_status.dart (hint)
    • lib/src/core/services/driving_options.dart (hint)
    • lib/src/core/services/duration.dart (hint)
    • lib/src/core/services/elevation_result.dart (hint)
    • lib/src/core/services/elevation_service.dart (hint)
    • lib/src/core/services/elevation_status.dart (hint)
    • lib/src/core/services/geocoder.dart (hint)
    • lib/src/core/services/geocoder_address_component.dart (hint)
    • lib/src/core/services/geocoder_component_restrictions.dart (hint)
    • lib/src/core/services/geocoder_geometry.dart (hint)
    • lib/src/core/services/geocoder_location_type.dart (hint)
    • lib/src/core/services/geocoder_request.dart (hint)
    • lib/src/core/services/geocoder_result.dart (hint)
    • lib/src/core/services/geocoder_status.dart (hint)
    • lib/src/core/services/location_elevation_request.dart (hint)
    • lib/src/core/services/max_zoom_result.dart (hint)
    • lib/src/core/services/max_zoom_service.dart (hint)
    • lib/src/core/services/max_zoom_status.dart (hint)
    • lib/src/core/services/path_elevation_request.dart (hint)
    • lib/src/core/services/place.dart (hint)
    • lib/src/core/services/time.dart (hint)
    • lib/src/core/services/traffic_model.dart (hint)
    • lib/src/core/services/transit_agency.dart (hint)
    • lib/src/core/services/transit_details.dart (hint)
    • lib/src/core/services/transit_fare.dart (hint)
    • lib/src/core/services/transit_line.dart (hint)
    • lib/src/core/services/transit_mode.dart (hint)
    • lib/src/core/services/transit_options.dart (hint)
    • lib/src/core/services/transit_route_preference.dart (hint)
    • lib/src/core/services/transit_stop.dart (hint)
    • lib/src/core/services/transit_vehicle.dart (hint)
    • lib/src/core/services/travel_mode.dart (hint)
    • lib/src/core/services/unit_system.dart (hint)
    • lib/src/core/services/vehicle_type.dart (hint)
    • lib/src/core/street_view/street_view_address_control_options.dart (hint)
    • lib/src/core/street_view/street_view_coverage_layer.dart (hint)
    • lib/src/core/street_view/street_view_link.dart (hint)
    • lib/src/core/street_view/street_view_location.dart (hint)
    • lib/src/core/street_view/street_view_location_request.dart (hint)
    • lib/src/core/street_view/street_view_pano_request.dart (hint)
    • lib/src/core/street_view/street_view_panorama.dart (hint)
    • lib/src/core/street_view/street_view_panorama_data.dart (hint)
    • lib/src/core/street_view/street_view_panorama_options.dart (hint)
    • lib/src/core/street_view/street_view_pov.dart (hint)
    • lib/src/core/street_view/street_view_preference.dart (hint)
    • lib/src/core/street_view/street_view_service.dart (hint)
    • lib/src/core/street_view/street_view_source.dart (hint)
    • lib/src/core/street_view/street_view_status.dart (hint)
    • lib/src/core/street_view/street_view_tile_data.dart (hint)
    • lib/src/google_maps_src.dart (hint)
    • lib/src/google_maps_src.g.dart (hint)
    • lib/src/google_maps_src_adsense.dart (hint)
    • lib/src/google_maps_src_adsense.g.dart (hint)
    • lib/src/google_maps_src_drawing.dart (hint)
    • lib/src/google_maps_src_drawing.g.dart (hint)
    • lib/src/google_maps_src_geometry.dart (hint)
    • lib/src/google_maps_src_geometry.g.dart (hint)
    • lib/src/google_maps_src_panoramio.dart (hint)
    • lib/src/google_maps_src_panoramio.g.dart (hint)
    • lib/src/google_maps_src_places.dart (hint)
    • lib/src/google_maps_src_places.g.dart (hint)
    • lib/src/google_maps_src_visualization.dart (hint)
    • lib/src/google_maps_src_visualization.g.dart (hint)
    • lib/src/google_maps_src_weather.dart (hint)
    • lib/src/google_maps_src_weather.g.dart (hint)
    • lib/src/library/adsense/ad_format.dart (hint)
    • lib/src/library/adsense/ad_unit.dart (hint)
    • lib/src/library/adsense/ad_unit_options.dart (hint)
    • lib/src/library/drawing/drawing_control_options.dart (hint)
    • lib/src/library/drawing/drawing_manager.dart (hint)
    • lib/src/library/drawing/drawing_manager_options.dart (hint)
    • lib/src/library/drawing/overlay_complete_event.dart (hint)
    • lib/src/library/drawing/overlay_type.dart (hint)
    • lib/src/library/geometry/encoding.dart (hint)
    • lib/src/library/geometry/poly.dart (hint)
    • lib/src/library/geometry/spherical.dart (hint)
    • lib/src/library/panoramio/panoramio_feature.dart (hint)
    • lib/src/library/panoramio/panoramio_layer.dart (hint)
    • lib/src/library/panoramio/panoramio_layer_options.dart (hint)
    • lib/src/library/panoramio/panoramio_mouse_event.dart (hint)
    • lib/src/library/places/autocomplete.dart (hint)
    • lib/src/library/places/autocomplete_options.dart (hint)
    • lib/src/library/places/autocomplete_prediction.dart (hint)
    • lib/src/library/places/autocomplete_service.dart (hint)
    • lib/src/library/places/autocompletion_request.dart (hint)
    • lib/src/library/places/component_restrictions.dart (hint)
    • lib/src/library/places/photo_options.dart (hint)
    • lib/src/library/places/place_aspect_rating.dart (hint)
    • lib/src/library/places/place_details_request.dart (hint)
    • lib/src/library/places/place_geometry.dart (hint)
    • lib/src/library/places/place_photo.dart (hint)
    • lib/src/library/places/place_result.dart (hint)
    • lib/src/library/places/place_review.dart (hint)
    • lib/src/library/places/place_search_pagination.dart (hint)
    • lib/src/library/places/place_search_request.dart (hint)
    • lib/src/library/places/places_service.dart (hint)
    • lib/src/library/places/places_service_status.dart (hint)
    • lib/src/library/places/prediction_substring.dart (hint)
    • lib/src/library/places/prediction_term.dart (hint)
    • lib/src/library/places/query_autocomplete_prediction.dart (hint)
    • lib/src/library/places/query_autocompletion_request.dart (hint)
    • lib/src/library/places/radar_search_request.dart (hint)
    • lib/src/library/places/rank_by.dart (hint)
    • lib/src/library/places/search_box.dart (hint)
    • lib/src/library/places/search_box_options.dart (hint)
    • lib/src/library/places/text_search_request.dart (hint)
    • lib/src/library/visualization/dynamic_maps_engine_layer.dart (hint)
    • lib/src/library/visualization/dynamic_maps_engine_layer_options.dart (hint)
    • lib/src/library/visualization/dynamic_maps_engine_mouse_event.dart (hint)
    • lib/src/library/visualization/feature_style.dart (hint)
    • lib/src/library/visualization/heatmap_layer.dart (hint)
    • lib/src/library/visualization/heatmap_layer_options.dart (hint)
    • lib/src/library/visualization/maps_engine_layer.dart (hint)
    • lib/src/library/visualization/maps_engine_layer_options.dart (hint)
    • lib/src/library/visualization/maps_engine_layer_properties.dart (hint)
    • lib/src/library/visualization/maps_engine_mouse_event.dart (hint)
    • lib/src/library/visualization/maps_engine_status.dart (hint)
    • lib/src/library/visualization/weighted_location.dart (hint)
    • lib/src/library/weather/cloud_layer.dart (hint)
    • lib/src/library/weather/label_color.dart (hint)
    • lib/src/library/weather/temperature_unit.dart (hint)
    • lib/src/library/weather/weather_conditions.dart (hint)
    • lib/src/library/weather/weather_feature.dart (hint)
    • lib/src/library/weather/weather_forecast.dart (hint)
    • lib/src/library/weather/weather_layer.dart (hint)
    • lib/src/library/weather/weather_layer_options.dart (hint)
    • lib/src/library/weather/weather_mouse_event.dart (hint)
    • lib/src/library/weather/wind_speed_unit.dart (hint)
    • lib/util/async.dart (hint)
  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use google_maps.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.44.0 <2.0.0
func ^1.0.0 1.0.0
js_wrapping ^0.4.5 0.4.7
meta ^1.1.2 1.1.5
Dev dependencies
browser ^0.10.0
build_runner ^0.8.1
html ^0.13.3
js_wrapping_generator ^0.4.5
test ^0.12.0