map.wxml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. <!-- 我的位置和返回位置两个按键 -->
  21. <view class="locat">
  22. <image class="iconBtn" src="../../images/myLocal.png" bindtap="myLocate"></image>
  23. <image class="iconBtn2" src="../../images/return.png" bindtap="returnBack"></image>
  24. </view>
  25. </view>
  26. <!-- 没有输入搜索内容时的搜索内容区 -->
  27. <view wx:if="{{showSearch}}" class="searchContain">
  28. <view class="mask" bindtap="shut"></view>
  29. <view class="searchContent">
  30. <view class="searchList" wx:for="{{marks}}" wx:key="index" data-index="{{index}}" bindtap="myChosed">{{marks[index].title}}
  31. </view>
  32. </view>
  33. </view>
  34. <!-- 输入了搜索内容后的搜索内容区 -->
  35. <view wx:if="{{searchContent && showSearch}}" class="searchContain">
  36. <view class="mask" bindtap="shut"></view>
  37. <view class="searchContent">
  38. <view class="searchList" wx:for="{{searchmarks}}" wx:key="index" data-index="{{index}}" bindtap="myChosed">{{searchmarks[index].title}}
  39. </view>
  40. </view>
  41. </view>