**首先:**百度API的文件引入
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=1GpAVwuZKZ8r4YGKSnfmtcz92W5ohBqG"></script>
第二部:
var vue = new Vue({
el: '#manage',
data: {
addrText: ''//vue渲染的地理位置信息
},
created: function() {
// 获取经纬度信息
**this.latLogToAddrText()**
},
methods:{
latLogToAddrText: function(){
var that = this;
// var map = new BMap.Map();
var point = new BMap.Point(116.331398,39.897445);
// map.centerAndZoom(point,12);
var geolocation = new BMap.Geolocation();
// 开启SDK辅助定位
geolocation.enableSDKLocation();
geolocation.getCurrentPosition(function(r){
if(this.getStatus() == BMAP_STATUS_SUCCESS){
// var mk = new BMap.Marker(r.