<select [(ngModel)]="currentLayerName" (ngModelChange)="handleCurrentLayerNameChange()">
  <option *ngFor="let layerStore of layersStore" [value]="layerStore.name">
    {{ layerStore.name }} —— {{ layerStore.type }}
  </option>
</select>
<button (click)="locatingLayer()">定位到该图层</button>
<button (click)="removeLayer()">删除该图层</button>
<button (click)="toggleLayerShow()">显隐该图层</button>
<button (click)="addLayer()">添加图层</button>

<dialog id="modal" #dialog>
  <form method="dialog">
    <p>
      <label for="layer-name">图层名：</label><input id="layer-name" type="text" [(ngModel)]="addLayerStore.name" name="name" />
    </p>
    <p>
      <label for="layer-url">图层 URL：</label><input id="layer-url" type="url" [(ngModel)]="addLayerStore.url" name="url" />
    </p>
    <p>
      <label for="layer-type">图层类型：</label>
      <select id="layer-type" [(ngModel)]="addLayerStore.type" name="type">
        <option [value]="LayerTypeMode.MODEL">模型</option>
        <option [value]="LayerTypeMode.IMAGERY">倾斜摄影</option>
        <option [value]="LayerTypeMode.POINTCLOUD">点云</option>
        <option [value]="LayerTypeMode.TERRAIN">地形</option>
        <option [value]="LayerTypeMode.IMAGEDATA">地图影像</option>
        <option [value]="LayerTypeMode.PANORAMICIMAGE">全景影像</option>
        <option [value]="LayerTypeMode.VECTOR">矢量</option>
        <option [value]="LayerTypeMode.WMS">WMS服务</option>
        <option [value]="LayerTypeMode.WMTS">WMTS服务</option>
      </select>
    </p>
    
    <menu>
      <button (click)="confirmAddLayer('canceled')">取消</button>
      <button (click)="confirmAddLayer('confirmed')">确定</button>
    </menu>
  </form>
</dialog>