parent
d352e3d39d
commit
d2899e0bfd
|
After Width: | Height: | Size: 4.5 KiB |
@ -1,3 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "地图定位",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1,2 +1,14 @@
|
||||
<!--pages/mine/mine.wxml-->
|
||||
<text>pages/mine/mine.wxml</text>
|
||||
<view class="container">
|
||||
<!-- 地图组件 - 占满全屏 -->
|
||||
<map
|
||||
id="myMap"
|
||||
longitude="{{longitude}}"
|
||||
latitude="{{latitude}}"
|
||||
scale="{{scale}}"
|
||||
markers="{{markers}}"
|
||||
style="width: 100%; height: 100%;">
|
||||
</map>
|
||||
|
||||
<!-- 悬浮定位按钮 -->
|
||||
<button class="locate-btn" bindtap="getCurrentLocation">定位当前位置</button>
|
||||
</view>
|
||||
@ -1 +1,19 @@
|
||||
/* pages/mine/mine.wxss */
|
||||
.container{
|
||||
padding: 0;
|
||||
}
|
||||
.locate-btn {
|
||||
position: absolute;
|
||||
bottom: 40rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 999;
|
||||
padding: 20rpx 40rpx;
|
||||
background-color: #007aff;
|
||||
color: white;
|
||||
border-radius: 10rpx;
|
||||
border: none;
|
||||
font-size: 32rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.2);
|
||||
min-width: 200rpx;
|
||||
text-align: center;
|
||||
}
|
||||
Loading…
Reference in new issue