如何在ng2-map中设置面板?

时间:2017-01-05 13:49:34

标签: angular

请提供任何使用ng2-map

设置面板的插件示例

我能够设置方向标记,但我无法设置面板我的div 标记为this Google maps Panel

它给出InvalidValueError:setPanel:NaN
我跟着:this reference

<ng2-map [hidden]="!checked" zoom="13" [center]="origin">
    <marker *ngFor="let pos of positions" [position]="pos"></marker>
    <directions-renderer
      [suppressMarkers]="true"
      [draggable]="true"      
      (directions_changed)="directionsChanged()"
      [directions-request]="direction"
      [panel]="directions-panel">
    </directions-renderer>
  </ng2-map>
  <button (click)="positions = showRandomMarkers()">Show Random Markers</button>
  <button (click)="positions = showDirection()">ShowDirections Markers</button>
   <br/>
   <div [hidden]="!checked" id="directions-panel" style="width: 28%; float:left; height: 450px; overflow: auto; padding: 0px 5px"></div>

0 个答案:

没有答案