1 Star 0 Fork 0

martian2049/node

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.html 3.32 KB
一键复制 编辑 原始数据 按行查看 历史
martian2049 提交于 2018-07-04 14:55 . session
<!-- <video src="http://anis.oss-cn-beijing.aliyuncs.com/onepiece/3.mp4#t=1143.11,1143.12"></video> -->
<!-- <!DOCTYPE html>
<html>
<body>
<input type="text" id="myText" class="wtf" value="A text field">
<p>Click the buttons to give focus and/or remove focus from the text field.</p>
<button type="button" onclick="getFocus()">Get focus</button>
<button type="button" onclick="loseFocus()">Lose focus</button>
<script>
function getFocus() {
// document.getElementById("myText").focus();
document.getElementsByClassName("wtf")[0].focus();
}
function loseFocus() {
document.getElementById("myText").blur();
}
</script>
</body>
</html> -->
<!-- <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<style>
#container {width:300px; height: 180px; }
</style>
<div id="container"></div>
<div id="addr"></div>
<script>
var url = 'http://webapi.amap.com/maps?v=1.4.7&key=6d93e77afff9f0aae38f822e2900d6d2&callback=doit';
var jsapi = document.createElement('script');
jsapi.charset = 'utf-8';
jsapi.src = url;
document.head.appendChild(jsapi);
function doit(){
console.log('yoiiii');
console.warn('screw baidu');
var mapObj = new AMap.Map('container', {
// center:[117.000923,36.675807],
// zoom:11
});
mapObj.plugin('AMap.Geolocation', function () {
geolocation = new AMap.Geolocation({
enableHighAccuracy: true,//是否使用高精度定位,默认:true
timeout: 10000, //超过10秒后停止定位,默认:无穷大
maximumAge: 0, //定位结果缓存0毫秒,默认:0
convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
showButton: true, //显示定位按钮,默认:true
buttonPosition: 'LB', //定位按钮停靠位置,默认:'LB',左下角
buttonOffset: new AMap.Pixel(10, 20),//定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20)
showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
zoomToAccuracy:true //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false
});
mapObj.addControl(geolocation);
geolocation.getCurrentPosition();
AMap.event.addListener(geolocation, 'complete', function(e){
console.log("e->", e);
addr.innerHTML = e.formattedAddress
});//返回定位信息
AMap.event.addListener(geolocation, 'error', function(e){
console.log("error->", e);
}); //返回定位出错信息
});
};
</script> -->
<script src="https://aniservice.oss-cn-beijing.aliyuncs.com/aliyun-oss-sdk.min.js"></script>
<!--
<script src="https://aniservice.oss-cn-beijing.aliyuncs.com/vue.js" type="text/javascript"></script>
<script src="https://aniservice.oss-cn-beijing.aliyuncs.com/vuex.js"></script>
<script src="https://aniservice.oss-cn-beijing.aliyuncs.com/vue-router.js"></script>
-->
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/martian2049/node.git
git@gitee.com:martian2049/node.git
martian2049
node
node
master

搜索帮助