Skip to content

Commit

Permalink
Merge branch 'master' into laurent-fix-universal-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Rupert Señga committed Oct 29, 2019
2 parents 43a26e0 + 8abe038 commit 7e8f0ca
Show file tree
Hide file tree
Showing 80 changed files with 6,817 additions and 4,361 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

**Steps to reproduce and a minimal demo of the problem**

_Use https://plnkr.co or similar -- try this template as a starting point: http://plnkr.co/edit/YX7W20?p=preview
_Use stackblitz.com or similar -- try this template as a starting point: https://stackblitz.com/edit/angular-google-maps-demo

_What steps should we try in your demo to see the problem?_

Expand All @@ -13,7 +13,7 @@ _What steps should we try in your demo to see the problem?_
**Expected/desired behavior**


**angular2 & angular-google-maps version**
**angular-google-maps, Angular, & any other relevant dependency versions**


**Other information**
**Other information**
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ test-built
npm-debug.log
*.ngfactory.ts
coverage/
.*.swp
.idea/
.DS_Store
docs/public
agm-*-*.tgz
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ cache:

before_install:
- yarn global add codecov
# - time npm i -g yarn --cache-min 999999999

install:
- time yarn
Expand Down
80 changes: 72 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
<a name="1.0.0"></a>
# [1.0.0 emma-soon](https://github.com/SebastianM/angular-google-maps/compare/1.0.0-beta.7...1.0.0) (2019-09-17)


### Bug Fixes

* **AgmCluster:** styles type and remove code duplication ([e55daaa](https://github.com/SebastianM/angular-google-maps/commit/e55daaa))
* **AgmMap:** respect disableDefaultUI ([#1709](https://github.com/SebastianM/angular-google-maps/issues/1709)) ([b70cbbc](https://github.com/SebastianM/angular-google-maps/commit/b70cbbc)), closes [#933](https://github.com/SebastianM/angular-google-maps/issues/933)
* **FitBounds:** add null check for null fit-bounds input ([2bf73de](https://github.com/SebastianM/angular-google-maps/commit/2bf73de))
* **FitBounds:** remove old location on loc change ([#1710](https://github.com/SebastianM/angular-google-maps/issues/1710)) ([b746ca3](https://github.com/SebastianM/angular-google-maps/commit/b746ca3)), closes [#1512](https://github.com/SebastianM/angular-google-maps/issues/1512)


### Features

* Support for Bicycling Layer ([#1678](https://github.com/SebastianM/angular-google-maps/issues/1678)) ([a9b2a9c](https://github.com/SebastianM/angular-google-maps/commit/a9b2a9c))
* use packagr to build as angular package format ([#1634](https://github.com/SebastianM/angular-google-maps/issues/1634)) ([df05277](https://github.com/SebastianM/angular-google-maps/commit/df05277)), closes [#1647](https://github.com/SebastianM/angular-google-maps/issues/1647) [#1157](https://github.com/SebastianM/angular-google-maps/issues/1157)
* **AgmCircle:** add getNativeMap function ([23c42cd](https://github.com/SebastianM/angular-google-maps/commit/23c42cd))
* **AgmMap:** add optional fit bounds padding ([29e4ebb](https://github.com/SebastianM/angular-google-maps/commit/29e4ebb)), closes [#1660](https://github.com/SebastianM/angular-google-maps/issues/1660) [#1471](https://github.com/SebastianM/angular-google-maps/issues/1471)
* **AgmMap:** Add tilesloaded event to AgmMap ([#1706](https://github.com/SebastianM/angular-google-maps/issues/1706)) ([d4f1371](https://github.com/SebastianM/angular-google-maps/commit/d4f1371)), closes [#1701](https://github.com/SebastianM/angular-google-maps/issues/1701)
* **FitBounds:** add fitBounds to agm-polyline-point ([74ceb2f](https://github.com/SebastianM/angular-google-maps/commit/74ceb2f)), closes [#1693](https://github.com/SebastianM/angular-google-maps/issues/1693)
* **MarkerClusterer:** enable clusterclick event ([1f2724b](https://github.com/SebastianM/angular-google-maps/commit/1f2724b)), closes [#1272](https://github.com/SebastianM/angular-google-maps/issues/1272)

<a name="1.0.0-beta.7"></a>
# [1.0.0-beta.7 green-ink](https://github.com/SebastianM/angular-google-maps/compare/1.0.0-beta.6...1.0.0-beta.7) (2019-07-14)


### Bug Fixes

* google is not defined when using fitBounds ([#1652](https://github.com/SebastianM/angular-google-maps/issues/1652)) ([c9e1313](https://github.com/SebastianM/angular-google-maps/commit/c9e1313)), closes [#1586](https://github.com/SebastianM/angular-google-maps/issues/1586)
* Remove "constructors" from interfaces ([2bb6102](https://github.com/SebastianM/angular-google-maps/commit/2bb6102))
* **AgmCircle:** circle strokeWeight error ([0442aa0](https://github.com/SebastianM/angular-google-maps/commit/0442aa0)), closes [#770](https://github.com/SebastianM/angular-google-maps/issues/770)
* **FitBounds:** correct distinct algorythm ([#1673](https://github.com/SebastianM/angular-google-maps/issues/1673)) ([75bcfa0](https://github.com/SebastianM/angular-google-maps/commit/75bcfa0))
* **PolylinePoint:** prevent accessing undefined variable on change ([21efc4f](https://github.com/SebastianM/angular-google-maps/commit/21efc4f)), closes [#1597](https://github.com/SebastianM/angular-google-maps/issues/1597)


### Features

* Add placeId to map click events ([34f651b](https://github.com/SebastianM/angular-google-maps/commit/34f651b)), closes [#691](https://github.com/SebastianM/angular-google-maps/issues/691) [#1539](https://github.com/SebastianM/angular-google-maps/issues/1539)
* Support for Transit Layer ([0f71222](https://github.com/SebastianM/angular-google-maps/commit/0f71222))
* **AgmMap:** add controlSize option ([7922546](https://github.com/SebastianM/angular-google-maps/commit/7922546)), closes [#1646](https://github.com/SebastianM/angular-google-maps/issues/1646)
* **AgmMap:** add tilt option ([49890c5](https://github.com/SebastianM/angular-google-maps/commit/49890c5))
* **AgmMap:** fix fitBounds causing protractor timeout ([#1611](https://github.com/SebastianM/angular-google-maps/issues/1611)) ([565b6a7](https://github.com/SebastianM/angular-google-maps/commit/565b6a7)), closes [#1548](https://github.com/SebastianM/angular-google-maps/issues/1548)
* **Polyline:** add IconSequences to Polylines ([46a39b7](https://github.com/SebastianM/angular-google-maps/commit/46a39b7)), closes [#721](https://github.com/SebastianM/angular-google-maps/issues/721)

<a name="1.0.0-beta.6"></a>
# [1.0.0-beta.6 opal-clarinet](https://github.com/SebastianM/angular-google-maps/compare/1.0.0-beta.5...1.0.0-beta.6) (2019-06-01)


### Bug Fixes

* **AgmCircle:** dragstart event misspelled ([8b2f2dc](https://github.com/SebastianM/angular-google-maps/commit/8b2f2dc)), closes [#1537](https://github.com/SebastianM/angular-google-maps/issues/1537)
* **AgmMap:** _updateBounds not creating newBounds object ([#1553](https://github.com/SebastianM/angular-google-maps/issues/1553)) ([0e8f1ab](https://github.com/SebastianM/angular-google-maps/commit/0e8f1ab))
* **core/marker:** drag and dragStart outputs ([#1604](https://github.com/SebastianM/angular-google-maps/issues/1604)) ([ba7c97e](https://github.com/SebastianM/angular-google-maps/commit/ba7c97e))


### Features

* add experimental angular 7/8 support ([e754bc7](https://github.com/SebastianM/angular-google-maps/commit/e754bc7))
* **AgmMap:** add area restriction option ([7201a75](https://github.com/SebastianM/angular-google-maps/commit/7201a75)), closes [#1624](https://github.com/SebastianM/angular-google-maps/issues/1624)
* **AgmMarker:** add drag and dragStart event support ([#1575](https://github.com/SebastianM/angular-google-maps/issues/1575)) ([1e6395d](https://github.com/SebastianM/angular-google-maps/commit/1e6395d))
* **AgmMarkerCluster:** add calculator option ([#1599](https://github.com/SebastianM/angular-google-maps/issues/1599)) ([03ceb1c](https://github.com/SebastianM/angular-google-maps/commit/03ceb1c))
* **GoogleMapsAPILoader:** change default API version ([#1577](https://github.com/SebastianM/angular-google-maps/issues/1577)) ([2fc1a21](https://github.com/SebastianM/angular-google-maps/commit/2fc1a21)), closes [#1573](https://github.com/SebastianM/angular-google-maps/issues/1573)
* **polygon, polyline:** add path change event ([#1643](https://github.com/SebastianM/angular-google-maps/issues/1643)) ([f9352a8](https://github.com/SebastianM/angular-google-maps/commit/f9352a8))

<a name="1.0.0-beta.5"></a>
# [1.0.0-beta.5 yellow-tape](https://github.com/SebastianM/angular-google-maps/compare/1.0.0-beta.4...1.0.0-beta.5) (2018-09-24)

Expand Down Expand Up @@ -77,7 +141,7 @@ Angular 4.x is not officially supported anymore. Please update to Angular 5.x or
* **snazzy-info-window:** support angular 4.x and 5.x ([28c9646](https://github.com/SebastianM/angular-google-maps/commit/28c9646))

### BREAKING CHANGES
Angular 2.x is not officially supported anymore. Please update to Angular 4.x or 5.x.
Angular 2.x is not officially supported anymore. Please update to Angular 4.x or 5.x.


<a name="1.0.0-beta.1"></a>
Expand Down Expand Up @@ -161,7 +225,7 @@ You can simply migrate by search/replace these class/selector names.

The package structure also changes. The root directory now contains **esm** code (ES5 code with ES2015 modules).

**A CommonJS compatible format and TS are not part of the package any more!
**A CommonJS compatible format and TS are not part of the package any more!
This change aligns with structure of the @angular packages.**

The styling of the maps is now more intuitive.
Expand Down Expand Up @@ -541,17 +605,17 @@ New:
import {SebmGoogleMap} from 'angular2-google-maps/directives/google-map';
```

* The module name has changed. So you have to change your import path.
old: `angular2_google_maps/angular2_google_maps`
* The module name has changed. So you have to change your import path.
old: `angular2_google_maps/angular2_google_maps`
new: `angular2-google-maps/core`
* ES5 files that can be consumed using CommonJS are now in the root directory (old path was `/cjs/angular2_google_maps`)
* The ES6 files directory has changed:
Old dir: `/es6/angular2_google_maps`
Old dir: `/es6/angular2_google_maps`
New dir: `/es6`
* The TypeScript files directory has changed:
Old dir: `/ts/angular2_google_maps`
* The TypeScript files directory has changed:
Old dir: `/ts/angular2_google_maps`
New dir: `/ts`
* The `/typings` directory with bundled typings was deleted.
* The `/typings` directory with bundled typings was deleted.
(Typings are now in the root directory seperated by file)


Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@

Angular 2+ components for Google Maps. (Previously known as angular2-google-maps)

-----
---

[Website](https://angular-maps.com/) | [Demo](https://stackblitz.com/edit/angular-google-maps-demo) | [Twitter](https://twitter.com/Sebholstein) | [Chat](https://discord.gg/XAr2ACE) | [API Documentation](https://angular-maps.com/api-docs/)

-----
---

[![Build Status](https://travis-ci.org/SebastianM/angular-google-maps.svg?branch=master)](https://travis-ci.org/SebastianM/angular-google-maps) [![Questions?: join the chat](https://img.shields.io/badge/questions%3F-join%20the%20chat-blue.svg)](https://discord.gg/XAr2ACE) [![npm version](https://badge.fury.io/js/%40agm%2Fcore.svg)](https://www.npmjs.com/package/@agm/core) ![supported angular versions: 6+](https://img.shields.io/badge/supported%20angular%20versions-6+-green.svg)

[![Build Status](https://travis-ci.org/SebastianM/angular-google-maps.svg?branch=master)](https://travis-ci.org/SebastianM/angular-google-maps) [![Questions?: join the chat](https://img.shields.io/badge/questions%3F-join%20the%20chat-blue.svg)](https://discord.gg/XAr2ACE) [![npm version](https://badge.fury.io/js/%40agm%2Fcore.svg)](https://www.npmjs.com/package/@agm/core) ![supported angular versions: 5+](https://img.shields.io/badge/supported%20angular%20versions-5+-green.svg)
---

## Packages

This project is a mono repo and hosts multiple packages:

| Package | Downloads |
|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| @agm/core | [![@agm/core](https://img.shields.io/npm/dm/@agm/core.svg)](https://www.npmjs.com/package/@agm/core) |
| @agm/snazzy-info-window | [![@agm/snazzy-info-window](https://img.shields.io/npm/dm/@agm/snazzy-info-window.svg)](https://www.npmjs.com/package/@agm/snazzy-info-window) |
| @agm/js-marker-clusterer | [![@agm/js-marker-clusterer](https://img.shields.io/npm/dm/@agm/js-marker-clusterer.svg)](https://www.npmjs.com/package/@agm/js-marker-clusterer) |
| Package | Downloads |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| @agm/core | [![@agm/core](https://img.shields.io/npm/dm/@agm/core.svg)](https://www.npmjs.com/package/@agm/core) |
| @agm/snazzy-info-window | [![@agm/snazzy-info-window](https://img.shields.io/npm/dm/@agm/snazzy-info-window.svg)](https://www.npmjs.com/package/@agm/snazzy-info-window) |
| @agm/js-marker-clusterer | [![@agm/js-marker-clusterer](https://img.shields.io/npm/dm/@agm/js-marker-clusterer.svg)](https://www.npmjs.com/package/@agm/js-marker-clusterer) |

---

## Playing with AGM (Angular Google Maps)
Expand All @@ -39,7 +42,3 @@ npm install @agm/core
```

You should also checkout the [Getting started](https://angular-maps.com/guides/getting-started/) guide for further information.

## Contributions

Please see the [contribution guidelines](CONTRIBUTING.md) for more details.
26 changes: 11 additions & 15 deletions docs/content/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you just want to play with AGM and don't want to set up a full project with N

There's also a really great video tutorial that follows exactly this guide. So if you prefer videos, we recommend watching this tutorial:

[![Google Maps & Angular | ANGULAR SNIPPETS](http://img.youtube.com/vi/lApggVS0icc/0.jpg)](http://www.youtube.com/watch?v=lApggVS0icc "")
[![Google Maps & Angular | ANGULAR SNIPPETS](https://img.youtube.com/vi/lApggVS0icc/0.jpg)](https://www.youtube.com/watch?v=lApggVS0icc "")

## Setting up a basic project structure

Expand Down Expand Up @@ -51,30 +51,26 @@ cd my-maps-project
`Angular Google Maps (short name: AGM)` gets shipped via the Node Package Manager (NPM). Run the following command to add it to your new project:

```bash
npm install @agm/core --save
npm install @agm/core
```

### Setup @NgModule

Open `src/app/app.module.ts` and import the `AgmCoreModule`.
Open `src/app/app.module.ts` and import the `AgmCoreModule`.
**You neeed to provide a Google Maps API key to be able to see a Map. Get an API key [here](https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en#key).**

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ApplicationRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';

import { NgModule } from '@angular/core';
import { AgmCoreModule } from '@agm/core';

import { AppComponent } from './app.component';

@NgModule({
imports: [
BrowserModule,
CommonModule,
FormsModule,
AgmCoreModule.forRoot({
apiKey: 'YOUR_KEY'
apiKey: ''
})
],
providers: [],
Expand All @@ -85,7 +81,7 @@ export class AppModule {}
```

### Extending the app component
Angular CLI already created an app component the we'll now use to create our first google map.
Angular CLI already created an app component the we'll now use to create our first google map.
Open the file `src/app/app.component.ts` and modify it like below:

```typescript
Expand All @@ -97,9 +93,9 @@ import { Component } from '@angular/core';
styleUrls: ['app.component.css'],
})
export class AppComponent {
title: string = 'My first AGM project';
lat: number = 51.678418;
lng: number = 7.809007;
title = 'My first AGM project';
lat = 51.678418;
lng = 7.809007;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,16 @@ When you import the `AgmJsMarkerClustererModule`, you can use the `agmMarkerClus
<agm-marker *ngFor="let marker of markers" [latitude]="marker.latitude" [longitude]="marker.longitude"></agm-marker>
</agm-marker-cluster>
</agm-map>
```
```

### Specifying a custom calculator

If you want to control how the cluster style is calculated, you can pass in a `CalculateFunction` via `calculator`:

```html
<agm-map [latitude]="0" [longitude]="0">
<agm-marker-cluster [calculator]="myCalculatorFn">
<agm-marker *ngFor="let marker of markers" [latitude]="marker.latitude" [longitude]="marker.longitude"></agm-marker>
</agm-marker-cluster>
</agm-map>
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ There are some basic style that get shipped with the `snazzy-info-window` NPM pa
node_modules/snazzy-info-window/dist/snazzy-info-window.css
```

If you are using Angular CLI, you can simply add this file to your `.angular-cli.json` file like this:
If you are using Angular CLI, you can simply add this file to your `angular.json` file like this:

```json
"styles": [
"styles.css",
"../node_modules/snazzy-info-window/dist/snazzy-info-window.css"
"node_modules/snazzy-info-window/dist/snazzy-info-window.css"
]
```

## Using the directive with a marker (AgmMarker)

When you import the `AgmSnazzyInfoWindowModule`, you can use the `agmSnazzyInfoWindow` directive in your template.
When you import the `AgmSnazzyInfoWindowModule`, you can use the `agmSnazzyInfoWindow` directive in your template.


```html
Expand Down Expand Up @@ -103,4 +103,4 @@ There a two ways to style the snazzy info window:

### Styling via Angular Inputs

There a several inputs that you can use for styling. [Check out the docs of the `agmSnazzyInfoWindow` directive here](https://angular-maps.com/api-docs/agm-snazzy-info-window/components/AgmSnazzyInfoWindow.html).
There a several inputs that you can use for styling. [Check out the docs of the `agmSnazzyInfoWindow` directive here](https://angular-maps.com/api-docs/agm-snazzy-info-window/components/AgmSnazzyInfoWindow).
Loading

0 comments on commit 7e8f0ca

Please sign in to comment.