我使用angular2-google-map移谷歌地圖的中心向右角2
我想轉移中心映射到左。
的HTML
<sebm-google-map [latitude]="center.lat" [longitude]="center.long">
<sebm-google-map-marker *ngFor="let h of mapData?.list" [latitude]="h.lat" [longitude]="h.lang">
<sebm-google-map-info-window [maxWidth]="300">
<strong>{{h.info}}</strong>
</sebm-google-map-info-window>
</sebm-google-map-marker>
</sebm-google-map>
Component.ts文件
@Component({
selector: 'google-map',
templateUrl: './google-map.component.html',
providers: [MapDataService]
})
export class googleMapComponent implements OnInit, OnChanges {
center:any;
@Input() mapData: Array<Object>;
public constructor(private mapService: MapDataService) {
this.center = {};
this.center['lat'] = 28.457523;
this.center['long'] = 77.026344;
}
}
感謝
注:圖片是從This question具有相同的問題(但在簡單的谷歌地圖)