feat: upgrade to Angular 9 and Nebular 5 (#5628)

BREAKING CHANGE:
Angular updated to version 9.
Nebular updated to version 5.
`@agm/core` replaced with `@angular/google-maps`.
`ng2-completer` replaced with `@akveo/ng2-completer`, read details [here](https://github.com/akveo/ng2-smart-table/pull/1140#issue-392285957).
This commit is contained in:
Evgeny Lupanov 2020-03-30 12:06:51 +03:00 committed by Maksim Karatkevich
parent b48f502f37
commit aa4ae169d9
21 changed files with 6191 additions and 3175 deletions

View file

@ -0,0 +1,3 @@
<google-map [center]="position" [zoom]="zoom" width="100%" height="36.5625rem">
<map-marker [position]="position"></map-marker>
</google-map>

View file

@ -0,0 +1,32 @@
import { Component, Input, OnInit } from '@angular/core';
import { PositionModel } from '../entity/position.model';
@Component({
selector: 'ngx-map',
templateUrl: './map.component.html',
styleUrls: ['./map.component.scss'],
})
export class MapComponent implements OnInit {
position: PositionModel = null;
zoom: number = 1;
@Input()
public set searchedPosition(position: PositionModel) {
if (position) {
this.position = position;
this.zoom = 12;
}
}
ngOnInit() {
// set up current location
if ('geolocation' in navigator) {
navigator.geolocation.getCurrentPosition((position) => {
this.searchedPosition = new PositionModel(
position.coords.latitude,
position.coords.longitude,
);
});
}
}
}