angular_google_maps 0.0.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 72

angular_google_maps

An Angular component for Google maps

Usage

A simple usage example:

import 'package:angular/angular.dart';
import 'package:angular_google_maps/angular_google_maps.dart';

main() async {
  await loadGoogleMaps("API_KEY");
  bootstrap(AppComponent);
}

<google-map
           style="width: 100%; height: 100%;"
           lat="48.8651651" 
           lng="2.3451825" 
           zoom="3" 
           (load)="onMapLoad(\$event)"></google-map>                  
void onMapLoaded(GMap map) {
  ...
}

Changelog

0.0.3

  • fix load map on https

0.0.2+1

  • rename mapOptions to options

0.0.2

  • Dynamic options

0.0.1

  • Initial version, created by Stagehand

example/main.dart

import 'package:angular/angular.dart';
import 'package:angular_google_maps/angular_google_maps.dart';

main() async {
  await loadGoogleMaps("API_KEY");
  bootstrap(AppComponent);
}

@Component(
    selector: 'showcase-google-map',
    template: '''<google-map
        style="width: 100%; height: 100%;"
        lat="-28.024" lng="140.887" zoom="3" (load)="onMapLoad(\$event)"></google-map>
                 ''',
    directives: const [GoogleMapComponent],
    pipes: const [COMMON_PIPES])
class AppComponent {
  List<LatLng> locations = [
    new LatLng(-31.563910, 147.154312),
    new LatLng(-33.718234, 150.363181),
    new LatLng(-33.727111, 150.371124),
    new LatLng(-33.848588, 151.209834),
    new LatLng(-33.851702, 151.216968),
    new LatLng(-34.671264, 150.863657),
    new LatLng(-35.304724, 148.662905),
    new LatLng(-36.817685, 175.699196),
    new LatLng(-36.828611, 175.790222),
    new LatLng(-37.750000, 145.116667),
    new LatLng(-37.759859, 145.128708),
    new LatLng(-37.765015, 145.133858),
    new LatLng(-37.770104, 145.143299),
    new LatLng(-37.773700, 145.145187),
    new LatLng(-37.774785, 145.137978),
    new LatLng(-37.819616, 144.968119),
    new LatLng(-38.330766, 144.695692),
    new LatLng(-39.927193, 175.053218),
    new LatLng(-41.330162, 174.865694),
    new LatLng(-42.734358, 147.439506),
    new LatLng(-42.734358, 147.501315),
    new LatLng(-42.735258, 147.438000),
    new LatLng(-43.999792, 170.463352)
  ];

  void onMapLoad(GMap map) {
    Iterable<Marker> markers = locations
        .map((l) => new Marker(new MarkerOptions()
          ..position = l
          ..map = map))
        .toList();
    loadMarkerClusterer().then((_) {
      new MarkerClusterer(map, markers);
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  angular_google_maps: "^0.0.3"

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:angular_google_maps/angular_google_maps.dart';
  
Version Uploaded Documentation Archive
0.0.3 Jan 30, 2018 Go to the documentation of angular_google_maps 0.0.3 Download angular_google_maps 0.0.3 archive
0.0.2+1 Jan 24, 2018 Go to the documentation of angular_google_maps 0.0.2+1 Download angular_google_maps 0.0.2+1 archive
0.0.2 Jan 24, 2018 Go to the documentation of angular_google_maps 0.0.2 Download angular_google_maps 0.0.2 archive
0.0.1 Jan 22, 2018 Go to the documentation of angular_google_maps 0.0.1 Download angular_google_maps 0.0.1 archive

Analysis

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

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

Scores

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

Platforms

Detected platforms: web

Primary library: package:angular_google_maps/angular_google_maps.dart with components: html.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Strong-mode analysis of lib/src/component.dart gave the following hint:

    line: 87 col: 31
    'onError' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
angular >=4.0.0 <5.0.0 4.0.0+2 5.0.0-alpha+14
dart_browser_loader >=0.0.3 <0.1.0 0.0.4
google_maps >=3.2.2 <4.0.0 3.2.4
google_maps_markerclusterer >=0.1.0 <1.0.0 0.1.1
Transitive dependencies
analyzer 0.30.0+4 0.32.1
angular_compiler 0.3.0+1 0.4.0-alpha+14
args 1.4.3
async 2.0.7
barback 0.15.2+16
build 0.11.2 0.12.6
build_barback 0.4.0+2 0.5.0+4
charcode 1.1.1
cli_util 0.1.3
code_builder 1.0.4 3.1.0
code_transformers 0.5.1+5
collection 1.14.10
convert 2.0.1
crypto 2.0.3
csslib 0.14.4
dart_style 1.0.9+1 1.0.14
front_end 0.1.0-alpha.4.1 0.1.1
func 1.0.0
glob 1.1.5
html 0.13.3+1
intl 0.15.6
isolate 1.1.0 2.0.1
js 0.6.1
js_wrapping 0.4.7
kernel 0.3.0-alpha.1.1 0.3.1
logging 0.11.3+1
matcher 0.12.2+1
meta 1.1.5
package_config 1.0.3
path 1.6.0
plugin 0.2.0+2
pool 1.3.5
quiver 0.25.0 0.29.0+1
quiver_hashcode 1.0.0
source_gen 0.7.5+1 0.8.1+3
source_maps 0.10.5
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
tuple 1.0.1
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+8
yaml 2.1.14
Dev dependencies
browser ^0.10.0 0.10.0+3
dart_to_js_script_rewriter ^1.0.1