map.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!--pages/map/map.wxml-->
  2. <view style="width: 100%;height: 100%;">
  3. <view class="search">
  4. <text class="searchBtn">搜索</text>
  5. <input class="searchInput" type="text" value="{{searchContent}}" bindinput="getSearchInput" bindfocus="getList" placeholder="请输入要搜索的景点"/>
  6. </view>
  7. <map class="myMap"
  8. id="map"
  9. subkey="{{subkey}}"
  10. name="导航"
  11. show-location="{{showlocation}}"
  12. show-compass="{{showcompass}}"
  13. enable-traffic="{{enabletraffic}}"
  14. longitude="{{searchmarks[0].longitude}}"
  15. latitude="{{searchmarks[0].latitude}}"
  16. markers="{{marks}}"
  17. include-points="{{points}}"
  18. bindmarkertap="bmakt">
  19. </map>
  20. <view class="locat">
  21. <image class="iconBtn" src="../../images/myLocal.png" bindtap="myLocate"></image>
  22. <image class="iconBtn2" src="../../images/return.png" bindtap="returnBack"></image>
  23. </view>
  24. </view>
  25. <view wx:if="{{showSearch}}" class="searchContain">
  26. <view class="mask" bindtap="shut"></view>
  27. <view class="searchContent">
  28. <view class="searchList" wx:for="{{marks}}" wx:key="index" data-index="{{index}}" bindtap="myChosed">{{marks[index].title}}
  29. </view>
  30. </view>
  31. </view>
  32. <view wx:if="{{searchContent && showSearch}}" class="searchContain">
  33. <view class="mask" bindtap="shut"></view>
  34. <view class="searchContent">
  35. <view class="searchList" wx:for="{{searchmarks}}" wx:key="index" data-index="{{index}}" bindtap="myChosed">{{searchmarks[index].title}}
  36. </view>
  37. </view>
  38. </view>