如何給地圖添加自定義標(biāo)注步驟?如何給地圖添加自定義標(biāo)注?

南遷地圖標(biāo)注 2022-01-17 16:20
【摘要】小編為您整理如何給地圖上的位置添加坐標(biāo)、申請(qǐng)標(biāo)注360地圖步驟、地圖怎么給自定義覆蓋物添加屬性、如何添加Mobile Atlas Creator的自定義地圖源、如何給圖片各個(gè)部分添加序號(hào) 像圖片這種標(biāo)注怎么弄相關(guān)地圖標(biāo)注知識(shí),詳情可查看下方正文!

如何給地圖上的位置添加坐標(biāo)?

你要看你用的什么搜索引擎的,什么軟件的,說了大家才好告訴你。一般都有專門標(biāo)記的。

直接點(diǎn)右鍵 插入坐標(biāo)不就完了嘛

什么地圖? 每個(gè)都不一樣,google,,搜狗等等,都不一樣


申請(qǐng)標(biāo)注360地圖步驟?

您好,該問題不屬于標(biāo)注認(rèn)領(lǐng)問題,給您帶來了不便,非常抱歉。

建議你到360論壇發(fā)帖問問,那里有工作人員會(huì)幫你解答的。

我也是遇到這樣的問題,沒看明白啥啥意思


地圖怎么給自定義覆蓋物添加屬性?

構(gòu)造函數(shù)并繼承Overlay// 定義自定義覆蓋物的構(gòu)造函數(shù) function SquareOverlay(center, length, color){ this._center = center; this._length = length; this._color = color; } // 繼承API的BMap.Overlay SquareOverlay.prototype = new BMap.Overlay();
二、初始化自定義覆蓋物// 實(shí)現(xiàn)初始化方法 SquareOverlay.prototype.initialize = function(map){ // 保存map對(duì)象實(shí)例 this._map = map; // 創(chuàng)建div元素,作為自定義覆蓋物的容器 var div = document.createElement("div"); div.style.position = "absolute"; // 可以根據(jù)參數(shù)設(shè)置元素外觀 div.style.width = this._length + "px"; div.style.height = this._length + "px"; div.style.background = this._color; // 將div添加到覆蓋物容器中 map.getPanes().markerPane.appendChild(div); // 保存div實(shí)例 this._div = div; // 需要將div元素作為方法的返回值,當(dāng)調(diào)用該覆蓋物的show、 // hide方法,或者對(duì)覆蓋物進(jìn)行移除時(shí),API都將操作此元素。 return div; }
三、繪制覆蓋物// 實(shí)現(xiàn)繪制方法 SquareOverlay.prototype.draw = function(){ // 根據(jù)地理坐標(biāo)轉(zhuǎn)換為像素坐標(biāo),并設(shè)置給容器 var position = this._map.ntToOverlayPixel(this._center); this._div.style.left = position.x - this._length / 2 + "px"; this._div.style.top = position.y - this._length / 2 + "px"; }
四、添加覆蓋物//添加自定義覆蓋物 var mySquare = new SquareOverlay(map.getCenter(), 100, "red"); map.addOverlay(mySquare);
五、給自定義覆蓋物添加
1、顯示SquareOverlay.prototype.show = function(){ if (this._div){ this._div.style.display = ""; } } 添加完以上顯示覆蓋物后,只需要下面這句話,就可以顯示覆蓋物了。mySquare.show();
2、隱藏覆蓋物// 實(shí)現(xiàn)隱藏方法 SquareOverlay.prototype.hide = function(){ if (this._div){ this._div.style.display = "none"; } } 添加完以上code,只需使用這句話,即可隱藏覆蓋物。mySquare.hide();
3、改變覆蓋物顏色SquareOverlay.prototype.yellow = function(){ if (this._div){ this._div.style.background = "yellow"; } } 上面這句話,是把覆蓋物的背景顏色改成黃色,使用以下語句即可生效:mySquare.yellow();“第五部分、給覆蓋物添加”小結(jié):我們?cè)诘貓D上添加了一個(gè)紅色覆蓋物,然后分別添加“顯示、隱藏、改變顏色”的。示意圖如下:那么,我們需要在里,先寫出map的容器,和3個(gè)按鈕。<div style="width:520px;height:340px;border:1px solid gray" id="container"></div><p> <input type="button" value="移除覆蓋物" onclick="mySquare.hide();"/> <input type="button" value="顯示覆蓋物" onclick="mySquare.show();"/> <input type="button" value="變成黃色" onclick="mySquare.yellow();"/></p>然后,在javascript中,添加這三個(gè)函數(shù):// 實(shí)現(xiàn)顯示方法 SquareOverlay.prototype.show = function(){ if (this._div){ this._div.style.display = ""; } } // 實(shí)現(xiàn)隱藏方法 SquareOverlay.prototype.hide = function(){ if (this._div){ this._div.style.display = "none"; } }//改變顏色的方法SquareOverlay.prototype.yellow = function(){ if (this._div){ this._div.style.background = "yellow"; } }
六、如何給自定義覆蓋物添加點(diǎn)擊(這章重要!很多人問的)比如,我們給自定義覆蓋物點(diǎn)擊click。首先,需要添加一個(gè)addEventListener 的。如下:SquareOverlay.prototype.addEventListener = function(event,fun){ this._div['on'+event] = fun;} 再寫該函數(shù)里面的參數(shù),比如click。這樣就跟地圖API里面的覆蓋物一樣了。mySquare.addEventListener('click',function(){ alert('click');}); 同理,添加完畢addEventListener之后,還可以添加其他鼠標(biāo),比如mouseover。mySquare.addEventListener('mousemover',function(){ alert('鼠標(biāo)移上來了');});
七、全部源代碼自定義覆蓋物


如何添加Mobile Atlas Creator的自定義地圖源?

添加多個(gè)標(biāo)注。當(dāng)添加多個(gè)標(biāo)注時(shí)就觸發(fā)以下代理方法#pragma mark -- BMKMapdelegate/***根據(jù)anntation生成對(duì)應(yīng)的View*@param mapView 地圖View*@param annotation 指定的標(biāo)注*@return 生成的標(biāo)注View*/-(BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation{if ([annotation isKindOfClass:[BMKPointAnnotation class]]) {BMKPinAnnotationView *newAnnotationView = [[BMKPinAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:@"myAnnotation"];newAnnotationView.animatesDrop = YES;newAnnotationView.annotation = annotation;//這里我根據(jù)自己需要,繼承了BMKPointAnnotation,添加了標(biāo)注的類型等需要的信息MyBMKPointAnnotation *tt = (MyBMKPointAnnotation *)annotation;


如何給圖片各個(gè)部分添加序號(hào) 像圖片這種標(biāo)注怎么弄?

這種很簡(jiǎn)單啦,不需要任何軟件,用win自帶的畫圖工具,里面有直線工具,和箭頭工具,線拉上附上文字說明就完成啦,還可以直接用截圖來完成。在線按Ctrl+Alt+A截圖,然后用文字工具處理一下就可以啦!


上一篇 :地圖標(biāo)注了商戶卻不顯示,朋友圈標(biāo)注了位置卻不顯示

下一篇:怎么在地圖上添加多個(gè)標(biāo)注?怎么在地圖上添加多個(gè)標(biāo)記?