鍍金池/ 問答/HTML/ 小程序地圖如何打開特定的位置?

小程序地圖如何打開特定的位置?

wx.getLocation({  
  type: 'gcj02',
  success: function(res){
    console.log(res)
    wx.openLocation({  
      latitude: res.latitude,
      longitude: res.longitude,
      scale: 28, // 縮放比例
    })  
  }  
}) 





文檔給的代碼是這樣的,但是打開的地圖確實(shí)用戶所在的位置,
假如我想打開特定的經(jīng)緯度應(yīng)該怎么做
回答
編輯回答
法克魷

直接把latitude,longitude的值替換

2018年9月23日 03:16