地图上的组件在开发工具上能显示 但在手机上不能显示
地图上的组件在开发工具上能显示 但在手机上不能显示
开发工具上是这样显示的:
有按钮和中间的图标
但手机上是这样显示的:
除了地图,什么也没有了,在开发工具里开发了老半天,在手机上一预览,居然变样了,很痛苦啊。界面和样式代码分别如下:
<!--index.wxml-->
<
view
>
<
map
style
=
"position:absolute"
id
=
"map"
longitude
=
"{{longitude}}"
latitude
=
"{{latitude}}"
scale
=
"16"
controls
=
"{{controls}}"
bindcontroltap
=
"controltap"
markers
=
"{{markers}}"
bindmarkertap
=
"markertap"
polyline
=
"{{polyline}}"
bindregionchange
=
"regionchange"
include-points
=
"{{include_points}}"
show-location
=
"true"
style
=
"width: 100%; height: 100vh;"
>
</
map
>
<
view
class
=
"center-area"
>
<
image
style
=
"width: 30px; height: 30px;"
src
=
"../../imgs/icon-map-marker.png"
></
image
>
</
view
>
<
view
class
=
"weui-msg__extra-area"
>
<
view
class
=
"weui-footer"
>
<
button
style
=
"position:absolute;margin-left:5px;"
bindtap
=
"btn_refresh_location"
>.</
button
>
<
button
style
=
"width:70%"
type
=
"primary"
bindtap
=
"btn_use_now"
>立即使用</
button
>
</
view
>
</
view
>
</
view
>
__
__
/**index.wxss**/ .center-area { position : fixed ; margin : auto ; left : 0 ; right : 0 ; top : 0 ; bottom : 0 ; width : 30px ; height : 30px ; } |
2.点击界面中的菜单按钮后,地图组件就什么也没有了
__
__
点击右上角的菜单按钮后,地图组件感觉就瘫痪了
求高手解答!!!!