<view class="flex-style">
  <view class="flex-item {{cindex=='0' ? 'active' : ''}}" data-id="0" bindtouchstart="changeType">驾车</view>
  <view class="flex-item {{cindex=='1' ? 'active' : ''}}" data-id="1" bindtouchstart="changeType">步行</view>
  <view class="flex-item {{cindex=='3' ? 'active' : ''}}" data-id="3" bindtouchstart="changeType">骑行</view>
</view>
<view class="map_box" wx:if="{{cindex!=2}}">
  <map id="navi_map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" markers="{{markers}}" polyline="{{polyline}}"
    show-location="true"></map>
</view>

<view class="text_box" wx:if="{{cindex!=2}}">
  <view class="text">{{distance}}</view>
  <view class="text">{{cost}}</view>
  <view class="detail_button" bindtouchstart="goDetail">详情</view>
  <view class="detail_button2" bindtouchstart="nav">导航</view>
</view>



<!-- <view class="flex-style">
  <view class="flex-item {{cindex=='0' ? 'active' : ''}}" data-id="0" bindtouchstart="changeType">驾车</view>
  <view class="flex-item {{cindex=='1' ? 'active' : ''}}" data-id="1" bindtouchstart="changeType">步行</view>
  <view class="flex-item {{cindex=='2' ? 'active' : ''}}" data-id="2" bindtouchstart="changeType">公交</view>
  <view class="flex-item {{cindex=='3' ? 'active' : ''}}" data-id="3" bindtouchstart="changeType">骑行</view>
</view>
<view class="map_box" wx:if="{{cindex!=2}}">
  <map id="navi_map" longitude="{{longitude}}" latitude="{{latitude}}" scale="16" markers="{{markers}}" polyline="{{polyline}}"
    show-location="true"></map>
</view>

<view class="text_box" wx:if="{{cindex!=2}}">
  <view class="text">{{distance}}</view>
  <view class="text">{{cost}}</view>
  <view class="detail_button" bindtouchstart="goDetail">详情</view>
  <view class="detail_button2" bindtouchstart="nav">导航</view>
</view>

<view class="bus_box" wx:for="{{transits}}" wx:for-item="i" wx:key="key1" wx:if="{{cindex==2}}">
  <text class="bus_item" wx:for="{{i.transport}}" wx:for-item="j" wx:key="key2">
    {{j}}
  </text>
</view> -->

