我正在研究这个例子:
@Component({
selector: 'my-app',
styles: [`
.sebm-google-map-container {
height: 300px;
}
`],
template: `
<sebm-google-map
[latitude]="lat"
[longitude]="lng"
[zoom]="zoom"
[disableDefaultUI]="false"
[zoomControl]="false">
<sebm-map-polygon
[paths]="paths"
[editable]="true"
[draggable]="true"
(polyClick)="click(event)"
(polyDblClick)="delete(event)">
</sebm-map-polygon>
</sebm-google-map>
`})
export class App {
zoom: number = 8;
paths : Array<LatLngLiteral>;
lat: number = 51.673858;
lng: number = 7.815982;
click(event: any){
console.log(event);
}
delete(event: any){
console.log(event);
}
paths: Array<LatLngLiteral> = [
{ lat: 51.373858, lng: 7.815982 },
{ lat: 51.673858, lng: 7.215982 },
{ lat: 51.373858, lng: 7.895982 }
];
}
http://plnkr.co/edit/8SuDfG6BD0HubpLHqHc8?p=preview
但是当我单击“保存”按钮(在我的项目中)时,我想获取所有多边形数据。
如何从地图中获取所有多边形数据?