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

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

用js+css3如何從前端獲取數(shù)據(jù),然后在地圖上顯示某個(gè)點(diǎn)

用js+css3如何從前端獲取數(shù)據(jù),然后在地圖上顯示某個(gè)點(diǎn)

阿阿阿阿Agnes 2016-10-23 20:58:34
用js+css3如何從前端獲取數(shù)據(jù),然后在地圖上顯示某個(gè)點(diǎn)的位置現(xiàn)在還只會(huì)用js在圖上標(biāo)出固定點(diǎn)的位置,如何用js獲取一個(gè)數(shù)據(jù)然后標(biāo)出這點(diǎn)的位置。我找的代碼可以在圖片上某點(diǎn)標(biāo)記出來但是如何用js把獲取的數(shù)據(jù)變成標(biāo)記呢謝謝!<head><title>star</title>?<script type="text/javascript">? ? ?? ? window.onload=function(){? ? ? ? var imgs=[? ? ? ? ? ? ? ? {x:10,y:10,src:"pictures.png"},? ? ? ? ? ? ? ? {x:200,y:10,src:"http://avatar.csdn.net/F/F/E/1_kk3k2005.jpg"}?? ? ? ? ],? ? ? ? map=document.getElementById("map");? ? ? ? for(var t in imgs){? ? ? ? ? ? var img=document.createElement("img");? ? ? ? ? ? img.className="img";? ? ? ? ? ? img.src=imgs[t].src;? ? ? ? ? ? img.style.left=imgs[t].x;? ? ? ? ? ? img.style.top=imgs[t].y;? ? ? ? ? ? map.appendChild(img);? ? ? ? }? ? };?</script><style type="text/css">? ? .map{? ? ? ? width: 500px;? ? ? ? height: 300px;? ? ? ? background: url('http://img.bbs.csdn.net/upload/201505/28/1432804103_373502.jpg') no-repeat;? ? ? ? background-size: 100% 100%;? ? ? ? position: relative;? ? }? ? .img{? ? ? ? position: absolute;? ? }</style></head>?<body>? ??? ?<div class="map" id="map"></div>? ??</body></html>?
查看完整描述

1 回答

?
GTX760

TA貢獻(xiàn)59條經(jīng)驗(yàn) 獲得超36個(gè)贊

你搜“百度地圖js api”

查看完整回答
反對(duì) 回復(fù) 2016-10-23
  • 1 回答
  • 0 關(guān)注
  • 2462 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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