js 跳转到指定位置 高德地图_地图加载[高德地图 纯JS API定位]显示

高德地图LBS JS加载

------------------------------------------------------------UI---------------------------------------------------

逆地理编码

.mui-bar{

background:#5ab2e0;

}

.mui-title{

color:#FFFFFF;

}

footer{

text-align: center;

}

.mui-content{

height: 100%;

}

#mapContainer{

top: 0;

left: 0;

position: relative;

min-height:200px;

}

#scrollPos{

position: relative;

min-height: 200px;

}

.mui-table-view-cell{

margin-left:-10px;

}

.aFont{

font-size: 14px;

}

.mui-icon{

display:inline-block;

font-size:20px;

color: #5ab2e0;

}

span{

display: inline-block;

}

.display_none{

display:none;

}

.mui-btn-custom{

background:#5ab2e0;

margin-top:3px;

height:38px;

border-color: #0081C2 1px;

}

.between-space{

display:inline-block;

margin: 0px 5%;

}

我的位置

我的位置

选定位置

---------------------------------------------------------Code-------------------------------------------------

- /* location.control.gelocation.js detail:

* the script bellow defined amount of function to get data about gelocation

* tips:

* before programe u need to add map display .css file && geolocation Key authorization to the file reference file

* #1

* #2

*/

// 当前点居中 !

mui.plusReady(function(){

/* DOM ELEMENT */

var UI ={

header : document.getElementById("header"),

footer : document.getElementById("footer"),

divMapContainer : document.getElementById("mapContainer"),

divScrollPos : document.getElementById("scrollPos"),

btnPostion : document.getElementById("postion"),

btnSubmit : document.getElementById("submitPos"),

};

/* G variable */

var strErrorParamNotInvalid = 'ParamNotInvalid';

var strErrorDistancePointInvalid = 'DistancePointInvalid';

var posLngLat ={ //当前定位地图 点坐标 [经度,纬度]

Lng : undefined,

Lat : undefined

}

var geolocationObject = { //当前大区[省-城市-区|县]

province :undefined,

city :undefined,

district :undefined

};

var geolocation ; //浏览器定位插件类

var loadMask; //加载遮罩蒙版

var mapResetFlag = 0; //地图重置标志

//var callLocation = 0;

var map = new AMap.Map("mapContainer", {

resizeEnable: true, //缩放显示

zoom: 10 //地图显示的缩放级别

});

//地图中添加地图操作ToolBar插件

map.plugin(['AMap.ToolBar'], function() {

var toolBar = new AMap.ToolBar();

map.addControl(toolBar);

});

var GeolocationInit = function(){

if(!envirVariableCheck("RESET")){ return ;}

map.plugin('AMap.Ge

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值