var mk = new BMap.Marker(r.point);
map.addOverlay(mk);//标出所在地
map.panTo(r.point);//地图中心移动
var point = new BMap.Point(r.point.lng,r.point.lat);//用所定位的经纬度查找所在地省市街道等信息
var gc = new BMap.Geocoder();
gc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
$(“#location-name”).html(“【”+addComp[‘province’]+“】”);
$(“#province option[value='”+addComp[‘province’]+“']”).attr(“selected”, true);
getLocal(“province=”+addComp[‘province’]);
});
}else {
alert(‘failed’+this.getStatus());
}
},{enableHighAccuracy: true})
}
var marker;
function getLocal(urlData){
//Ajax.call(‘/Marketing2.php?act=getlocal’,urlData,returnToCartResponse,‘POST’, ‘TEXT’, true, true);
//function returnToCartResponse(result){
result=[{“id”:“515”,“province”:“\u6e56\u5317\u7701”,“area”:“\u5b9c\u660c”,“shopname”:“\u77e5\u6765\u667a\u80fd\u79d1\u6280”,“shopaddr”:“\u6e56\u5317\u7701\u5b9c\u660c\u5e02\u5747\u7476\u5e7f\u573a\u4e00\u697c\u77e5\u6765\u667a\u80fd\u4f53\u9a8c\u9986”,“location”:“111.31098109196,30.732757818026”},{“id”:“516”,“province”:“\u6e56\u5317\u7701”,“area”:“\u6b66\u6c49”,“shopname”:“\u6b66\u6c49\u89e3\u653e\u5927\u9053\u4f18\u8da3\u5e97”,“shopaddr”:“\u6e56\u5317\u7701\u6b66\u6c49\u5e02\u6c5f\u6c49\u533a\u89e3\u653e\u5927\u9053557\u53f7\u4e2d\u5c71\u5e7f\u573a1\u697c\u82cf\u5b81\u6613\u8d2d\u4f18\u8da3”,“location”:“114.27613872848,30.587851596764”},{“id”:“517”,“province”:“\u6e56\u5317\u7701”,“area”:“\u6b66\u6c49”,“shopname”:“\u6b66\u6c49\u5149\u8c37\u4f18\u8da3\u5e97”,“shopaddr”:“\u6e56\u5317\u7701\u6b66\u6c49\u5e02\u6d2a\u5c71\u533a\u6c11\u9662\u8def\u5149\u8c37\u5e7f\u573a\u8d44\u672c\u5927\u53a6\u8d1f\u4e00\u697c\u82cf\u5b81\u6613\u8d2d”,“location”:“114.40624298256,30.510448272271”},{“id”:“518”,“province”:“\u6e56\u5317\u7701”,“area”:“\u8944\u9633”,“shopname”:“\u8d35\u53cb\u7535\u5668\u6709\u9650\u516c\u53f8”,“shopaddr”:“\u6e56\u5317\u7701\u8944\u9633\u5e02\u6a0a\u57ce\u533a\u6625\u5143\u8def8\u53f7\u73b0\u4ee3\u57ce\u6570\u7801\u6e2f\u4e00\u697c1038\u53f7”,“location”:“112.14366834884,32.058976142962”},{“id”:“519”,“province”:“\u6e56\u5317\u7701”,“area”:“\u5341\u5830”,“shopname”:“\u9f0e\u5174\u6295\u5f71\u79d1\u6280\u6709\u9650\u516c\u53f8”,“shopaddr”:“\u6e56\u5317\u7701\u5341\u5830\u5e02\u5f20\u6e7e\u533a\u516d\u5830\u6cf0\u5f18\u7535\u8111\u57ce\u4e8c\u697cA\u533a45\u53f7”,“location”:“110.7906542215,32.661244015944”},{“id”:“520”,“province”:“\u6e56\u5317\u7701”,“area”:“\u6069\u65bd”,“shopname”:“\u5dde\u987a\u5174\u8fbe\u7535\u8111\u6709\u9650\u516c\u53f8”,“shopaddr”:“\u6e56\u5317\u7701\u6069\u65bd\u5dde\u56fd\u6cf0\u5927\u53a62\u697c\u987a\u8fbe\u7535\u8111”,“location”:“109.4926968993,30.278629959823”},{“id”:“521”,“province”:“\u6e56\u5317\u7701”,“area”:“\u8346\u5dde”,“shopname”:“\u767e\u4fe1\u7535\u8111”,“shopaddr”:“\u6e56\u5317\u7701\u8346\u5dde\u5e02\u6c99\u5e02\u533a\u7ea2\u95e8\u8def\u98de\u817e\u6570\u7801\u5e7f\u573a\u4e8c\u697c2008\u53f7\uff08\u8346\u5dde\u767e\u4fe1\u7535\u8111\uff09”,“location”:“112.26757444672,30.312061976048”},{“id”:“522”,“province”:“\u6e56\u5317\u7701”,“area”:“\u76d1\u5229”,“shopname”:“\u8bba\u7c73\u667a\u6167\u5c45\u5bb6\u751f\u6d3b\u9986”,“shopaddr”:“\u6e56\u5317\u7701\u8346\u5dde\u5e02\u76d1\u5229\u767e\u665f\u5e7f\u573a\u4e8c\u697c296\u53f7”,“location”:“113.0019564425,29.848933249111”}];
result1=eval(result);
reg=eval(result);
if(reg.length<1){
$(“#store-list”).children().remove();
$(“#store-list”).append(“
return false;
}
var storeList=“”;
$(“#store-num”).html(reg.length);
map.clearOverlays();
var pointsView = [];
for(var i=0;i<reg.length;i++){
var n=i+1;
var p= reg[i][‘location’].split(‘,’);
var point = new BMap.Point(p[0],p[1]);
pointsView.push(point);
var content =“
”+reg[i].shopname+“
地址:”+reg[i].shopaddr+“
”;var myIcon = new BMap.Icon(“img/bd1.png”, new BMap.Size(21, 33), {
offset: new BMap.Size(10, 25), // 指定定位位置
});
var marker = new BMap.Marker(point,{icon:myIcon}); // 创建标注
var label = new BMap.Label(n,{
offset : new BMap.Size(0,3)
});
label.setStyle({
width:‘21px’,background:‘none’,color:‘#fff’,border:‘none’,textAlign:‘center’//只要对label样式进行设置就可达到在标注图标上显示数字的效果
});
marker.setLabel(label);//显示地理名称 a
map.addOverlay(marker);
addClickHandler(content,marker);
storeList+=‘<li οnclick="to(this,’+i+‘,’+p[0]+‘,’+p[1]+‘,’‘+reg[i].shopname+’‘,’‘+reg[i].shopaddr+’‘)">’+n+‘
+‘
’+reg[i].shopname+‘
’+reg[i].shopaddr+‘
’+‘’;
}
//让所有点在视野范围内
map.setViewport(pointsView);
$(“#store-list”).children().remove();
$(“#store-list”).append(storeList);
// }
}
var opts = {
width : 250, // 信息窗口宽度
height: 50, // 信息窗口高度
title : “” , // 信息窗口标题
enableMessage:true//设置允许信息窗发送短息
};
//点击将信息内容加入白标注中
function addClickHandler(content,marker){
marker.addEventListener(“click”,function(e){
marker.setAnimation(null);
openInfo(content,e);
}
);
}
function openInfo(content,e){
var p = e.target;
var point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
var infoWindow = new BMap.InfoWindow(content,opts); // 创建信息窗口对象
map.openInfoWindow(infoWindow,point); //开启信息窗口
}
//移动到某一坐标点
function to(obj,i,x,y,shopname,shopaddr){
var allOverlay = map.getOverlays();
var last=allOverlay.length-1;
map.removeOverlay(allOverlay[last]);
$(obj).addClass(“addMove”);
$(obj).siblings().removeClass(“addMove”);
var point=new BMap.Point(x,y);
map.centerAndZoom(point,15);
var myIcon = new BMap.Icon(“bd2.png”, new BMap.Size(21, 33), {
offset: new BMap.Size(10, 25), // 指定定位位置
});
var marker = new BMap.Marker(point,{icon:myIcon}); // 创建标注
var n=i+1;
var label = new BMap.Label(n,{
offset : new BMap.Size(0,3)
});
label.setStyle({ width:‘21px’,background:‘none’,color:‘#fff’,border:‘none’,textAlign:‘center’//只要对label样式进行设置就可达到在标注图标上显示数字的效果
});
marker.setLabel(label);//显示地理名称 a
map.addOverlay(marker);
var content =“
”+shopname+“
地址:”+shopaddr+“
”;addClickHandler(content,marker);
}
style.css
/**
-
Eric Meyer’s Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
-
http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
}
body {
line-height: 1.5;
font: 14px/1.5 “Helvetica Neue”,Helvetica,Arial,“Microsoft Yahei”,“Hiragino Sans GB”,“Heiti SC”,“WenQuanYi Micro Hei”,sans-serif;
color: #333;
}
.fl {
float: left;
}
.w1150 {
width: 100%;
margin: 0 auto;
clear: both;
}
.video-wrapper {
padding-top: 80px;
padding: 0px 5%;
position: relative;
}
.clearfix {
overflow: hidden;
_zoom: 1;
}
.map-top {
padding: 5px 35px 5px 25px;
background: #fff;
}
.location-cur-pos {
position: relative;
float: left;
line-height: 50px;
padding-left: 40px;
font-size: 16px;
color: #212121;
letter-spacing: 1px;
background: url(img/pos.png) left 2px no-repeat;
}
.form-section {
position: relative;
margin: 0px;
padding: 0;
border: 0;
text-align: left;
margin-top: 5px;
}
.xm-select {
display: block;
width: 220px;
margin-right: 14px;
}
.form-section {
position: relative;
margin: 0px;
padding: 0;
border: 0;
text-align: left;
margin-top: 5px;
}
.location-section {
float: right;
}
.xm-select .dropdown {
position: relative;
display: block;
overflow: hidden;
_zoom: 1;
width: 100%;
max-width: 100%;
height: 38px;
border: 1px solid #e0e0e0;
background: #fff;
color: #333;
-webkit-transition: border-color .2s linear;
transition: border-color .2s linear;
}
.xm-select label {
position: absolute;
right: 14px;
top: 11px;
z-index: 1;
width: 16px;
height: 16px;
padding: 0;
font-size: 16px;
line-height: 1;
color: #b0b0b0;
cursor: pointer;
pointer-events: none;
}
.iconfont {
font-family: “iconfont” !important;
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.xm-select select {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 120%;
max-width: 120%;
min-width: 120%;
height: 38px;
margin: 0;
border: 0;
padding: 0 16px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
font-size: 14px;
font-weight: 400;
line-height: 38px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
_zoom: 1;
vertical-align: middle;
background: none;
color: #333;
outline: none;
cursor: pointer;
}
.location-main {
background: #f7f7f7;
margin-bottom: 30px;
border: solid 1px #e9e9e9;
}
.location-shop-con {
width: 325px;
}
.search-box {
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 14px 24px 4px 20px;
padding: 0 14px;
-webkit-border-radius: 14px / 50%;
-moz-border-radius: 14px / 50%;
border-radius: 14px / 50%;
text-align: left;
background: #e9e9e9;
}
.search-box .search-input {
line-height: 28px;
height: 28px;
font-size: 14px;
color: #868686;
width: 96%;
background: #e9e9e9;
}
.search-icon {
position: absolute;
display: inline-block;
background: url(https://wwwstatic.vivo.com.cn/vivoportal/web/dist/img/store/search-icon_6dc8cd4.png) center no-repeat;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
color: #fff;
top: 7px;
right: 14px;
height: 14px;
width: 14px;
cursor: pointer;
}
.location-list li {
position: relative;
height: 80px;
padding-top: 12px;
padding-right: 25px;
font-size: 12px;
cursor: pointer;
background: #fff;
-webkit-transition: all 0.3s;
transition: all 0.3s;
margin: 10px 10px 0px 10px;
}
.location-list .location-num {
position: absolute;
left: 7px;
top: 27px;
width: 21px;
height: 33px;
line-height:23px;
color: #fff;
text-align: center;
background:url(“img/bd1.png”);
}
.location-list .location-addr {
padding-left: 40px;
font-family: ‘Microsoft Yahei’;
font-size: 12px;
color: #999;
}
最后
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长,自己不成体系的自学效果低效漫长且无助。
因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点!不论你是刚入门Android开发的新手,还是希望在技术上不断提升的资深开发者,这些资料都将为你打开新的学习之门!
如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
{
padding-left: 40px;
font-family: ‘Microsoft Yahei’;
font-size: 12px;
color: #999;
}
最后
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长,自己不成体系的自学效果低效漫长且无助。
因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
[外链图片转存中…(img-RVYNVVlU-1715794577535)]
[外链图片转存中…(img-CPIVvnj1-1715794577536)]
[外链图片转存中…(img-G7IU1OpF-1715794577536)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点!不论你是刚入门Android开发的新手,还是希望在技术上不断提升的资深开发者,这些资料都将为你打开新的学习之门!
如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!