<template>
  <view class="zhjs-container">
        <u-navbar title="综合监视" :autoBack="true" :titleStyle="{
				fontSize:'18px'
			}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
        </u-navbar>
        <map style="width:100vw; height:100vh;margin-top:70px" id="map" :latitude="latitude" :longitude="longitude" :markers="markers"
            :show-location="true" scale="13" :enable-satellite="enableSatellite" theme="satellite">
                <cover-image src="/static/tabs/dingwei.png" class="location" @click="onControlTap"></cover-image>
        </map>
         
    </view>
  
</template>
<script>
    export default {
        data() {
            return {
                latitude: 31.52,
                longitude: 114.76,
                enableSatellite:true,
                markers: [{
                    latitude: 31.52,
                    longitude: 114.76,
                    iconPath: '../../static/tabs/add.png',
                    width: "25",
                    height: "25"
                }],
                dingwei: '../../static/tabs/dingwei.png'
            }
        },
        methods: {
          onControlTap(){
            const map = uni.createMapContext("map");
            map.moveToLocation()
          },
          nvueShow: function() {
          			const subnvue = uni.getSubNVueById('drawer') // 获取nvue
                console.log(subnvue);
          			subnvue.show()  // 显示nvue
          		}
        },
       mounted() {
         this.nvueShow()
       }
    }
</script>

<style lang="scss">
   .location{
    position: absolute;
    width: 35px;
    height:35px;
    bottom: 100px;
    left:10px;
    background-color: #fff;
    padding: 5px;
   }
</style>