android keys
This commit is contained in:
@@ -3,6 +3,8 @@ import { GoogleMap } from '@capacitor/google-maps';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Location, Locations } from '../../interfaces/location';
|
||||
import { MarkerEl } from '../../interfaces/marker';
|
||||
import {Platform} from "@ionic/angular";
|
||||
|
||||
@Component({
|
||||
selector: 'app-tracking',
|
||||
templateUrl: './tracking.component.html',
|
||||
@@ -11,7 +13,8 @@ import { MarkerEl } from '../../interfaces/marker';
|
||||
export class TrackingComponent implements OnInit {
|
||||
|
||||
@ViewChild('map') public mapEl: ElementRef<HTMLElement>;
|
||||
|
||||
ios: boolean;
|
||||
android: boolean;
|
||||
public map: GoogleMap;
|
||||
|
||||
public heading: string = null;
|
||||
@@ -29,7 +32,10 @@ export class TrackingComponent implements OnInit {
|
||||
|
||||
private ids: Array<string> = [];
|
||||
|
||||
constructor() {
|
||||
constructor(public platform: Platform) {
|
||||
this.ios = platform.is('ios');
|
||||
this.android = platform.is('android');
|
||||
|
||||
this.heading = 'Select a country from the above menu';
|
||||
this.description = 'Interact with the markers that are displayed for each selected country';
|
||||
setTimeout(async () => {
|
||||
@@ -56,7 +62,7 @@ export class TrackingComponent implements OnInit {
|
||||
this.map = await GoogleMap.create({
|
||||
id: 'google-map',
|
||||
element: this.mapEl.nativeElement,
|
||||
apiKey: environment.keys.googleMaps,
|
||||
apiKey: (this.ios== true ) ?environment.keys.googleMapsIOS : environment.keys.googleMapsAndroid,
|
||||
forceCreate: true,
|
||||
config: {
|
||||
center: {
|
||||
|
||||
Reference in New Issue
Block a user