<!-- 未选点 -->
<ion-button (click)="openModal()" expand="block">开始选点</ion-button>

<!-- 已选点 -->

<ion-modal [isOpen]="isModalOpen" (willDismiss)="onWillDismiss($event)">
  <ng-template>
    <ion-header>
      <ion-toolbar>
        <ion-buttons slot="start">
          <ion-button (click)="cancel()">Cancel</ion-button>
        </ion-buttons>
        <ion-title>地图选点<ng-container *ngIf="location">({{location.latitude}},{{location.longitude}})</ng-container></ion-title>
        <ion-buttons slot="end">
          <ion-button (click)="confirm()" [strong]="true">Confirm</ion-button>
        </ion-buttons>
      </ion-toolbar>
    </ion-header>
    <ion-content class="ion-padding">
      <!-- 详细地址 -->
      <ion-item>
        <ion-input
          label="请输入详细地址"
          labelPlacement="stacked"
          type="text"
          placeholder="精确到门牌号"
          [(ngModel)]="address"
        ></ion-input>
        <ion-button slot="end" (click)="searchByAddress()">搜索</ion-button>
      </ion-item>

      <!-- 地图选点 -->
      <div id="container"></div>
      <div id="panel"></div>

    </ion-content>
  </ng-template>
</ion-modal>

