微信小程序--地图导航

时间:2017-08-17 21:01:59   收藏:0   阅读:485
wx.getLocation({  
  type: ‘gcj02‘, //返回可以用于wx.openLocation的经纬度  
  success: function(res) {  
    var latitude = res.latitude  
    var longitude = res.longitude  
    wx.openLocation({  
      latitude: latitude,  
      longitude: longitude,  
      name:"花园桥肯德基",  
     scale: 28  
    })  
  }  
})  

 

原文:http://www.cnblogs.com/gjack/p/7384244.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!