整合Bing Maps

來源:互聯網
上載者:User

     目前的地圖服務主要微軟的virtual earth,google的google earth和yahoo的map service.從開發上來說,微軟的virtual earth是最方便的。不過論地圖的精準性還是google的強大,畢竟它做的比較早。微軟已經將virtual earth改成Bing maps,將地圖服務整合到Bing(必應)搜尋中。而微軟的live service又包含bing service和Windows Azure Platform,live service本身就是架構在windows Azure平台上面 。扯到這裡已經扯的很遠了。

一般Map service有以下應用場合:

l 網站地理定位。比如你可以把你的商店,資產裝置,公司機構形象化的顯示在地圖上。可以便利的使用鳥瞰圖進行map漫遊和特定搜尋。

l 資訊門戶。基於地圖的入口網站搜尋,將地圖資訊與相關資訊進行整合便於地圖搜尋。

l 旅行門戶– 提供虛擬路線和路線中的資訊如路線中經過的商店,銀行,賓館等。

l 移動定位服務 .

l 即時航線和路線預測追蹤

在微軟開發領域,整合Google earth可以用其提供的COM api進行整合。COM api或和google的service進行互動。同時COM sdk提供了地圖用戶端的操作模型。

下面重點談談如何整合Bing Maps. 整合Bing Maps有二種方式

1 Meshup

l Ajax control

Example:

<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>

<script type="text/javascript">

var map = null;

function GetMap()

{

map = new VEMap('myMap');

map.LoadMap();

}

</script>

</head>

<body onload="GetMap();">

<div id='myMap' style="position:relative; width:400px; height:400px;"></div>

</body>

</html>

l Silverlight control

<UserControl x:Class="MapControlInteractiveSdk.Tutorials.Modes.TutorialFadingLabels"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl">

<Grid x:Name="LayoutRoot" Background="White">

<m:Map CredentialsProvider="{StaticResource MyCredentials}" Center="37.806029,-122.407007" ZoomLevel="16">

<m:Map.Mode>

<m:AerialMode Labels="True" FadingLabels="True" />

</m:Map.Mode>

</m:Map>

<Border VerticalAlignment="Top" HorizontalAlignment="Right" Background="White" Opacity="0.7" CornerRadius="5" Padding="10">

<TextBlock Text="Labels fade after a few seconds when mouse remains still." />

</Border>

</Grid>

</UserControl>

l Asp.net control還沒有推出,馬上推出

2 server-side integration

有兩種地圖web service可供選擇。

l Bing Maps Web Services. Bing Maps Web Services (BMWS) provides SOAP/XML Web service access to static map images (.gif, .jpeg, and .png), direct map tile access, one-box search functionality, geocoding, reverse geocoding, and routing. These services also integrate with features in the Bing Maps Silverlight Control to provide a complete Web mapping application feature set.

l MapPoint Web Service. The MapPoint Web Service (MWS) uses industry-proven Web services available from Microsoft since 2002. The MWS core strength includes the ability to use customer-specific data to perform proximity and route searching and line drive maps.

其他整合方式:

某些第三方組件公司如ComponentOne提供了Map control for silverlight,map Control for asp.net,可以設定data source為google earth或virtual earth,可以更方便的API去控制地圖。在GE項目中我們就是用了這種方式

1. Virtual earth API主要功能:

2. 顯示地圖

3. 使用圖層,(圖釘圖層,shape圖層)

4. 加入元素(可以按比例縮放),加入元素按照座標

5. 加入map 事件

6. 自訂地表徵圖題圖層

7. 調用bing maps web service做商務邏輯自訂

8. 自訂形狀或導航

9. 資料繫結

10. 其他

是GE 項目的

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.