angular_google_maps 0.0.3

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

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);
    });
  }
}

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

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

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

Platforms

Detected platforms: web

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

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.

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+4
dart_browser_loader >=0.0.3 <0.1.0 0.0.3
google_maps >=3.2.2 <4.0.0 3.2.2
google_maps_markerclusterer >=0.1.0 <1.0.0 0.1.0
Transitive dependencies
analyzer 0.30.0+4 0.31.0+1
angular_compiler 0.3.0+1 0.4.0-alpha+4
args 1.3.0
async 2.0.3
barback 0.15.2+14
build 0.11.2 0.12.0+1
build_barback 0.4.0+2 0.5.0+3
charcode 1.1.1
cli_util 0.1.2+1
code_builder 1.0.4 3.0.1
code_transformers 0.5.1+4
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
csslib 0.14.1
dart_style 1.0.9+1
front_end 0.1.0-alpha.4.1 0.1.0-alpha.8
func 0.1.1 1.0.0
glob 1.1.5
html 0.13.2+2
intl 0.15.2
isolate 1.1.0
js 0.6.1
js_wrapping 0.4.2
kernel 0.3.0-alpha.1.1 0.3.0-alpha.5
logging 0.11.3+1
matcher 0.12.1+4
meta 1.1.2
package_config 1.0.3
path 1.5.1
plugin 0.2.0+2
pool 1.3.4
quiver 0.25.0 0.28.0
quiver_hashcode 1.0.0
source_gen 0.7.4+3
source_maps 0.10.4
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
tuple 1.0.1
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+7
yaml 2.1.13
Dev dependencies
browser ^0.10.0 0.10.0+2
dart_to_js_script_rewriter ^1.0.1