小编D. *_*rgo的帖子

Ionic2/3 angular google maps TypeError:Object(...)不是新FitBoundsService的函数

我正在尝试从主网站上实例化一个angular-google-maps示例:https://angular-maps.com/guides/getting-started/来对应用程序进行一些测试.

我使用了他们的示例代码,如下所示:

import { Component } from '@angular/core';
        @Component({
              selector: 'page-location',
              templateUrl: 'location.html',

            })
            export class LocationPage {
              title: string = 'My first AGM project';
              lat: number = 51.678418;
              lng: number = 7.809007;
}



page-location 
{

    agm-map {
  height: 150px;
}

}



<h1>{{ title }}</h1>

<!-- this creates a google map on the page with the given lat/lng from -->
<!-- the component as the initial center of the map: -->
<agm-map style="height: 300px;" [latitude]="lat" [longitude]="lng"> …
Run Code Online (Sandbox Code Playgroud)

android ionic2 ionic3 angular

3
推荐指数
1
解决办法
2456
查看次数

标签 统计

android ×1

angular ×1

ionic2 ×1

ionic3 ×1