zoukankan      html  css  js  c++  java
  • uniapp使用小程序地图地位功能实现方法

    <map style=" 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="markers" @markertap="markertap"
          @callouttap="callouttap" :polyline="polylines" show-location :enable-traffic="true"> </map>
    	data() {
    			return {
    				remnant:0,
    				content:"",
    				title:"",
    				role:false,
    				latitude: 39.909,
    				longitude: 116.39742,
    				markers: [{
    						 40,
    						height: 40,
    						latitude: 39.9345,
    						longitude: 119.61063,
    						iconPath: '../../static/logo.png',
    						id: 1,
    						customCallout: {
    							anchorX: 0,
    							anchorY: 0,
    							display: "BYCLICK"
    						}
    					},
    					{
    						 40,
    						height: 40,
    						latitude: 39.989,
    						longitude: 116.39742,
    						iconPath: '../../static/logo.png',
    						id: 2,
    						callout: {
    							color: '#ffffff',
    							content: '气泡内容',
    							fontSize: 16,
    							borderRadius: 5,
    							bgColor: '#FF0000',
    							padding: 20,
    							textAlign: 'center',
    							display: "BYCLICK"
    						}
    					}
    				],
    				polylines: [],
    				markers: [], //标记点数组
    

      

    Location() { //本地位置权限获取
                    let that = this
                    wx.getLocation({
                        type: 'gcj02',
                        timeout:"1000",
                        success(res) {
                            console.log(res)
                            that.latitude = res.latitude
                            that.longitude = res.longitude
                            // that.markers[0].latitude = res.latitude
                            // that.markers[0].longitude = res.longitude
                            const speed = res.speed
                            const accuracy = res.accuracy
                        }
                    })
    
                },
  • 相关阅读:
    Tplmap-20210117
    SSRFmap-20210203
    SQLmap-1.5.6.5
    SecPoint Port Scanner v4.0
    pycharm+selenium 自动化打开百度网页 停止 并 关闭
    python+selenium自动化的简单的百度搜索代码
    selenium.common.exceptions.SessionNotCreatedException
    Postman断言状态码
    TLS和SSL的区别
    五大类HTTP状态码
  • 原文地址:https://www.cnblogs.com/ly1368489670/p/14240564.html
Copyright © 2011-2022 走看看