mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-24 03:10:13 +01:00
Replace @agm/core with @angular/google-maps
This commit is contained in:
parent
88020acd3e
commit
398c8c2a87
6 changed files with 34 additions and 22 deletions
8
src/app/pages/maps/gmaps/gmaps.component.html
Normal file
8
src/app/pages/maps/gmaps/gmaps.component.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<nb-card>
|
||||
<nb-card-header>Google Maps</nb-card-header>
|
||||
<nb-card-body>
|
||||
<google-map [center]="position" [zoom]="8" width="100%" height="36.5625rem">
|
||||
<map-marker [position]="position"></map-marker>
|
||||
</google-map>
|
||||
</nb-card-body>
|
||||
</nb-card>
|
||||
|
|
@ -3,19 +3,8 @@ import { Component } from '@angular/core';
|
|||
@Component({
|
||||
selector: 'ngx-gmaps',
|
||||
styleUrls: ['./gmaps.component.scss'],
|
||||
template: `
|
||||
<!-- <nb-card>
|
||||
<nb-card-header>Google Maps</nb-card-header>
|
||||
<nb-card-body>
|
||||
<agm-map [latitude]="lat" [longitude]="lng">
|
||||
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
|
||||
</agm-map>
|
||||
</nb-card-body>
|
||||
</nb-card> -->
|
||||
`,
|
||||
templateUrl: './gmaps.component.html'
|
||||
})
|
||||
export class GmapsComponent {
|
||||
|
||||
lat = 51.678418;
|
||||
lng = 7.809007;
|
||||
public readonly position = { lat: 51.678418, lng: 7.809007 };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
// import { AgmCoreModule } from '@agm/core';
|
||||
import { GoogleMapsModule } from '@angular/google-maps';
|
||||
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
|
||||
import { NgxEchartsModule } from 'ngx-echarts';
|
||||
import { NbCardModule } from '@nebular/theme';
|
||||
|
|
@ -10,10 +10,7 @@ import { MapsRoutingModule, routedComponents } from './maps-routing.module';
|
|||
@NgModule({
|
||||
imports: [
|
||||
ThemeModule,
|
||||
// AgmCoreModule.forRoot({
|
||||
// apiKey: 'AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k',
|
||||
// libraries: ['places'],
|
||||
// }),
|
||||
GoogleMapsModule,
|
||||
LeafletModule.forRoot(),
|
||||
MapsRoutingModule,
|
||||
NgxEchartsModule,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k"></script>
|
||||
</head>
|
||||
<body>
|
||||
<ngx-app>Loading...</ngx-app>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue