国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Bing Maps-----微軟

2019-11-08 02:27:55
字體:
來源:轉載
供稿:網友

Bing Maps

Bing Maps是微軟公司推出的Bing服務中線上地圖服務。

       使用它,可以在網絡瀏覽器中觀察到世界上的每一個角落。它的原名叫做”MSN Virtual Earth”,在微軟推出了 Windows Live 后它被改進后更名為Live Search Maps并整合到了 Windows Live 產品系列中。現在,它作為Bing搜索引擎的一部分提供,并于2009年12月3日發布了一個新的測試版本。        Bing Maps是微軟公司推出的Bing服務中線上地圖服務。使用它,可以在網絡瀏覽器中觀察到世界上的每一個角落。它的原名叫做“MSN Virtual Earth”,在微軟推出了 Windows Live 后它被改進后更名為Live Search Maps并整合到了 Windows Live 產品系列中?,F在,它作為Bing搜索引擎的一部分提供,并于2009年12月3日發布了一個新的測試版本。

一般功能

       Bing Maps的工作原理類似Google Maps、Google Earth、Mapquest和Yahoo! Maps,可以逐級地改變地圖的比例尺,并提供矢量地圖和衛星地圖這兩種常見的顯示模式。Live Search Maps中只有美國地區擁有最詳盡的矢量地圖和最清晰的衛星地圖,其他地區的地圖不是很詳盡甚至是錯誤的。例如有些國家被誤列為一個地區而非國家。同時,它也提供了駕車服務,不過僅限于北美地區。這些和上述的四種在線地圖服務大同小異。

案例:

<script type="text/javascript"> //獲取經緯度 var jingdu = document.getElementsByName('jingdu')[0].value; var weidu = document.getElementsByName('weidu')[0].value; var map = null; var searchManager = null; //顯示地圖 function getMap() { var bussiness = "train station"; map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: 'Ai9T-Bz3s5G6XdBM4xgcF6IwVm73uOeRHTkybtHbIDVajr8CbsoEbrhq-oDov-LF'}); //自動加載事件 Microsoft.Maps.loadModule('Microsoft.Maps.Search', { callback: reverseGeocodeRequest }); //Microsoft.Maps.loadModule('Microsoft.Maps.Search', { callback: searchRequest(bussiness) }); } //創建搜索 function createSearchManager() { map.addComponent('searchManager', new Microsoft.Maps.Search.SearchManager(map)); searchManager = map.getComponent('searchManager'); } //顯示附近的業務 function reverseGeocodeRequest() { createSearchManager(); var userData = { name: 'Maps Test User', id: 'XYZ' }; map.setView({zoom: 10}); var request = { location: new Microsoft.Maps.Location(jingdu,weidu), callback: onReverseGeocodeSuccess, errorCallback: onReverseGeocodeFailed, userData: userData }; searchManager.reverseGeocode(request); } function onReverseGeocodeSuccess(result, userData) { if (result) { map.entities.clear(); var pushpin = new Microsoft.Maps.Pushpin(result.location, null); map.setView({ center: result.location, zoom: 10 }); map.entities.push(pushpin); } else { alert('no Location found, try panning map'); } } function onReverseGeocodeFailed(result, userData) { alert('Rev geocode failed'); } function createSearchManager() { map.addComponent('searchManager', new Microsoft.Maps.Search.SearchManager(map)); searchManager = map.getComponent('searchManager'); } //搜索內容 function searchRequest(business) { createSearchManager(); var what = business; var userData = { name: 'Maps Test User', id: 'XYZ' }; var where = 'boston, ma'; var request = { what: what, where: where, count: 10, startIndex: 0, bounds: map.getBounds(), callback: search_onSearchSuccess, errorCallback: search_onSearchFailure, userData: userData }; searchManager.search(request); } function search_onSearchSuccess(result, userData) { map.entities.clear(); var searchResults = result && result.searchResults; if (searchResults) { for (var i = 0; i < searchResults.length; i++) { search_createMapPin(searchResults[i]); } if (result.searchRegion && result.searchRegion.mapBounds) { map.setView({ bounds: result.searchRegion.mapBounds.locationRect }); } else { alert('No results returned, Please try after sometime.'); } } } function search_createMapPin(result) { if (result) { var pin = new Microsoft.Maps.Pushpin(result.location, null); Microsoft.Maps.Events.addHandler(pin, 'click', function () { search_showInfoBox(result) }); map.entities.push(pin); } } function search_showInfoBox(result) { if (currInfobox) { currInfobox.setOptions({ visible: true }); map.entities.remove(currInfobox); } currInfobox = new Microsoft.Maps.Infobox( result.location, { title: result.name, description: [result.address, result.city, result.state, result.country, result.phone].join(' '), showPointer: true, titleAction: null, titleClickHandler: null }); currInfobox.setOptions({ visible: true }); map.entities.push(currInfobox); } function search_onSearchFailure(result, userData) { alert('Search failed'); } //附近各種業務 $(document).on("click",".Span span",function(){ var date = $(this).attr("data-type"); var business1 = "train station"; var business2 = "school"; var business3 = "Supermarket"; if(date==1){ Microsoft.Maps.loadModule('Microsoft.Maps.Search', { callback: searchRequest(business1) }); } else if(date==2){ Microsoft.Maps.loadModule('Microsoft.Maps.Search', { callback: searchRequest(business2) }); }else{ Microsoft.Maps.loadModule('Microsoft.Maps.Search', { callback: searchRequest(business3) }); } }); $(function(){ $('.Span span').click(function(){ $('.Span span').removeClass('on'); $(this).addClass('on'); }); }); </script>

特色功能


鳥瞰視角        最大的特色在于45°鳥瞰(bird’s eye)的視角。這是不同于矢量地圖和衛星地圖的第三種顯示模式。使用鳥瞰模式,最大可以查看到20碼距離的圖片,這和從樓房的5、6層窗外看到的景色差不多。正是這樣的特色,使得Live Search Maps一經推出便吸引了大眾的注意。目前擁有鳥瞰視角的城市并不是很多,但是微軟正在不斷地擴充它。新版的鳥瞰視圖已經稍作更改,開始以稍有不同的角度去顯示地圖,以求更好的顯示效果駕車行駛        Bing Maps提供身臨其境的駕車行駛服務。目前只有美國的西雅圖和舊金山兩座城市擁有這一服務。使用該服務,用戶可以模擬在馬路上開車的情形。3D地圖        美國 Redmond、Beaverton、Portland、Yonkers、Cheektowaga、Niagara、舊金山、San Jose、西雅圖、波士頓、費城、洛杉磯、拉斯維加斯、底特律、鳳凰、休士頓、Baltimore、亞特蘭大、Denver、Dallas-Fort Worth、Buffalo、紐約市、Austin、Cincinnati、Indianapolis、Joliet (Illinois)、Naperville、Cape Coral、Tampa、Savannah、好萊塢(佛羅里達州)、Oceanside(佛羅里達州)及邁阿密。        加拿大 Calgary, Levis-St. Romuald, Niagara、渥太華、Aurora……        英國 Brighton, Northampton, Swindon……        中國 北京,成都……        其他地方 La Jolla, La Mesa, Miramar……

參考資料

效果圖:https://yangfd.com/PRoperty-to-rent/586de479bd773203dbd7805a (此效果圖僅為參考) 文檔:https://www.bingmapsportal.com/ISDK/AjaxV7#SpatialDataServices (此文檔為英文文檔,需翻譯后可看)


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 塘沽区| 赤壁市| 北碚区| 阆中市| 南丰县| 临夏县| 仁化县| 托克托县| 南靖县| 东平县| 天津市| 成都市| 玛沁县| 连云港市| 宝鸡市| 烟台市| 岳普湖县| 武山县| 古浪县| 五河县| 安平县| 会昌县| 呼玛县| 常州市| 绥芬河市| 靖远县| 泸州市| 镶黄旗| 瓦房店市| 龙岩市| 固安县| 文昌市| 汶川县| 修文县| 嘉善县| 泸州市| 普陀区| 都匀市| 桦南县| 大宁县| 太仓市|