Skip to content

Commit

Permalink
fix(addressMarker): address marker shouldn't have lat lng
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomau committed Mar 28, 2017
1 parent 82a3d35 commit c64a00b
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 12 deletions.
5 changes: 4 additions & 1 deletion dist/amd/google-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/amd/google-maps.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/commonjs/google-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/commonjs/google-maps.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/es2015/google-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/es2015/google-maps.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/native-modules/google-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/native-modules/google-maps.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions dist/system/google-maps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/system/google-maps.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/google-maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const isAddressMarker = (marker: Marker): marker is AddressMarker => {
return (<AddressMarker>marker).address !== undefined;
}

const isLatLongMarker = (marker: Marker): marker is LatLongMarker => {
return (<LatLongMarker>marker).latitude !== undefined && (<LatLongMarker>marker).longitude !== undefined;
}

export type Marker = AddressMarker | LatLongMarker;

@noView()
Expand Down Expand Up @@ -470,7 +474,7 @@ export class GoogleMaps {
this._mapPromise.then(() => {
Promise.all<LatLongMarker>(
newValue.map(marker => {
if (isAddressMarker(marker)) {
if (isAddressMarker(marker) && !isLatLongMarker(marker)) {
return this.addressMarkerToMarker(marker);
} else {
return marker;
Expand Down

0 comments on commit c64a00b

Please sign in to comment.