mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-27 11:46:10 +01:00
Remove packages uncompatible with Ivy
This commit is contained in:
parent
99e85ac0fe
commit
d673c512ec
16 changed files with 62 additions and 69 deletions
|
|
@ -7,9 +7,9 @@ import { Component } from '@angular/core';
|
|||
<nb-card>
|
||||
<nb-card-header>Google Maps</nb-card-header>
|
||||
<nb-card-body>
|
||||
<agm-map [latitude]="lat" [longitude]="lng">
|
||||
<!-- <agm-map [latitude]="lat" [longitude]="lng">
|
||||
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
|
||||
</agm-map>
|
||||
</agm-map> -->
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
`,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { AgmCoreModule } from '@agm/core';
|
||||
// import { AgmCoreModule } from '@agm/core';
|
||||
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
|
||||
import { NgxEchartsModule } from 'ngx-echarts';
|
||||
import { NbCardModule } from '@nebular/theme';
|
||||
|
|
@ -10,10 +10,10 @@ import { MapsRoutingModule, routedComponents } from './maps-routing.module';
|
|||
@NgModule({
|
||||
imports: [
|
||||
ThemeModule,
|
||||
AgmCoreModule.forRoot({
|
||||
apiKey: 'AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k',
|
||||
libraries: ['places'],
|
||||
}),
|
||||
// AgmCoreModule.forRoot({
|
||||
// apiKey: 'AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k',
|
||||
// libraries: ['places'],
|
||||
// }),
|
||||
LeafletModule.forRoot(),
|
||||
MapsRoutingModule,
|
||||
NgxEchartsModule,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<agm-map [latitude]="latitude"
|
||||
<!-- <agm-map [latitude]="latitude"
|
||||
[longitude]="longitude"
|
||||
[scrollwheel]="false"
|
||||
[zoom]="zoom">
|
||||
<agm-marker [latitude]="latitude"
|
||||
[longitude]="longitude"></agm-marker>
|
||||
</agm-map>
|
||||
</agm-map> -->
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, ElementRef, EventEmitter, NgZone, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { MapsAPILoader } from '@agm/core';
|
||||
// import { MapsAPILoader } from '@agm/core';
|
||||
import { Location } from '../entity/Location';
|
||||
|
||||
|
||||
|
|
@ -14,31 +14,31 @@ export class SearchComponent implements OnInit {
|
|||
@ViewChild('search', { static: true })
|
||||
public searchElementRef: ElementRef;
|
||||
|
||||
constructor(private mapsAPILoader: MapsAPILoader,
|
||||
constructor(// private mapsAPILoader: MapsAPILoader,
|
||||
private ngZone: NgZone) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// load Places Autocomplete
|
||||
this.mapsAPILoader.load().then(() => {
|
||||
const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef.nativeElement, {
|
||||
types: ['address'],
|
||||
});
|
||||
autocomplete.addListener('place_changed', () => {
|
||||
this.ngZone.run(() => {
|
||||
// get the place result
|
||||
const place: google.maps.places.PlaceResult = autocomplete.getPlace();
|
||||
// this.mapsAPILoader.load().then(() => {
|
||||
// const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef.nativeElement, {
|
||||
// types: ['address'],
|
||||
// });
|
||||
// autocomplete.addListener('place_changed', () => {
|
||||
// this.ngZone.run(() => {
|
||||
// // get the place result
|
||||
// const place: google.maps.places.PlaceResult = autocomplete.getPlace();
|
||||
|
||||
// verify result
|
||||
if (place.geometry === undefined || place.geometry === null) {
|
||||
return;
|
||||
}
|
||||
// // verify result
|
||||
// if (place.geometry === undefined || place.geometry === null) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
this.positionChanged.emit(
|
||||
new Location(place.geometry.location.lat(),
|
||||
place.geometry.location.lng()));
|
||||
});
|
||||
});
|
||||
});
|
||||
// this.positionChanged.emit(
|
||||
// new Location(place.geometry.location.lat(),
|
||||
// place.geometry.location.lng()));
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue