第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

百度地圖自定義覆蓋物

百度地圖自定義覆蓋物

kathria 2017-09-21 22:34:25
var mp = new BMap.Map("allmap",{minZoom:16,maxZoom:19,enableMapClick: false});?? ?mp.centerAndZoom(new BMap.Point(114.324421,30.534198), 15);?? ?mp.enableScrollWheelZoom();?? ??? ?// 復(fù)雜的自定義覆蓋物?? ?$.get('/ph/Api/get_ban_map_point',function(res){?? ??? ?res = JSON.parse(res);?? ??? ?var aDate = res.data.point.length;?? ??? ?console.log(res);?? ??? ?for(var i=0;i<aDate;i++){?? ??? ??? ??? ?ComplexCustomOverlay.prototype = new BMap.Overlay();??? ComplexCustomOverlay.prototype.initialize = function(map){????? this._map = map;????? var div = this._div = document.createElement("div");????? div.style.backgroundColor = "#2d69f9";???? ?????? div.style.color = "white";????? div.style.width = "110px";????? div.style.padding = "5px";????? div.style.lineHeight = "18px";????? div.style.whiteSpace = "nowrap";????? div.style.MozUserSelect = "none";????? div.style.fontSize = "12px"????? var span = this._span = document.createElement("span");????? div.appendChild(span);????? span.appendChild(document.createTextNode(this._text));???? ?????? var that = this;????? var arrow = this._arrow = document.createElement("div");????? arrow.style.width = "0px";????? arrow.style.position = "absolute";????? arrow.style.height = "0px";????? arrow.style.borderLeft = "10px solid transparent";????? arrow.style.borderRight = "10px solid transparent";????? arrow.style.borderTop="10px solid #2d69f9" ????? arrow.style.left="20px";????? arrow.style.top="25px";????? div.appendChild(arrow);??? ?????? div.onmouseover = function(){??????? this.style.backgroundColor = "#ff6400";??????? arrow.style.borderLeft = "10px solid transparent";?? ???? arrow.style.borderRight = "10px solid transparent";?? ???? arrow.style.borderTop="10px solid #ff6400" ;????? }????? div.onmouseout = function(){??????? this.style.backgroundColor = "#2d69f9";//????? this.style.borderColor = "#BC3B3A";??????? this.getElementsByTagName("span")[0].innerHTML = that._text;//????? arrow.style.backgroundPosition = "0px 0px";? ?? ??? ?arrow.style.borderLeft = "10px solid transparent";?? ?????? arrow.style.borderRight = "10px solid transparent";?? ?????? arrow.style.borderTop="10px solid #2d69f9" ;????? }????? mp.getPanes().labelPane.appendChild(div);???? ?????? return div;??? }??? ComplexCustomOverlay.prototype.draw = function(){????? var map = this._map;????? var pixel = map.pointToOverlayPixel(this._point);//??? this._div.style.left = pixel.x - parseInt(this._arrow.style.left) + "px";//??? this._div.style.top? = pixel.y - 30 + "px";??? }? ???? ???? var myCompOverlay = new ComplexCustomOverlay(new BMap.Point(res.data.point[i].BanGpsX,res.data.point[i].BanGpsY), res.data.point[i].BanID);??? mp.addOverlay(myCompOverlay);? ??? ??? ?}?? ?})//get?? ???? function ComplexCustomOverlay(point, text){????? this._point = point;????? this._text = "編號(hào):"+text; ???? }為什么位置都湊到一起去了。
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 2105 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)