arcgis api for silverlight使用google map等多个在线地图

时间:2022-12-20 14:33:34

原文 http://blog.csdn.net/leesmn/article/details/6820245

无可否认,google map实在是很漂亮。可惜对于使用arcgis api for silverlight的我们来说,无法使用它的确不爽。虽然,arcgis api for silverlight可以使用bing map。但是bing map中国地区的地图很差,城市道路信息几乎没有。稍微得到些许安慰的是最新版本(比方2.2版本)可以支持OpenStreetMap,效果比bing map 好多了。

使用OpenStreetMap

xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"

xmlns:open="clr-namespace:ESRI.ArcGIS.Client.Toolkit.DataSources;assembly=ESRI.ArcGIS.Client.Toolkit.DataSources"

<esri:Map x:Name="MyMap">
            <esri:Map.Layers>
                <open:OpenStreetMapLayer ID="MyLayer"></open:OpenStreetMapLayer>
            </esri:Map.Layers>
        </esri:Map>

效果:

arcgis api for silverlight使用google map等多个在线地图

如果,能把这些在线地图拿来自己的项目中用,和自己发布的专题ArcGIS图层叠加使用那就完美了。

推荐大家一个好用的多数据源地图服务软件:PortableBasemapServer

arcgis api for silverlight使用google map等多个在线地图

启用在线地图承载:

arcgis api for silverlight使用google map等多个在线地图

选择GoogleMapsRoad,Arcgis Rest Service:http://192.168.1.100:8000/PBS/rest/services/GoogleMapsRoad/MapServer (ip地址根据你自己的电脑而定)

把这个地址拷贝到ArcGISTiledMapServiceLayer的Url中,那么就访问的是google map的底图啦

<esri:Map x:Name="MyMap">
            <!--<esri:Map.Layers>
                <open:OpenStreetMapLayer ID="MyLayer"></open:OpenStreetMapLayer>
            </esri:Map.Layers>-->
            <esri:ArcGISTiledMapServiceLayer Url="http://192.168.1.100:8000/PBS/rest/services/GoogleMapsRoad/MapServer" ></esri:ArcGISTiledMapServiceLayer>
        </esri:Map>

arcgis api for silverlight使用google map等多个在线地图

也可以 选择bing map

arcgis api for silverlight使用google map等多个在线地图

PortableBasemapServer的下载地址:http://www.arcgis.com/home/item.html?id=48bf53da123e442ab8ac9aed52747552

后话:大家应该都知道在中国官方运营的地图比方google,搜狗,mapabc等在线地图都是经过了*处理的,做了偏移。所以如果用gps采集
到的数据直接放在这些在线地图上定位将是不准的,有很大的偏差。为此小弟自己写了一个dll来处理这种偏差,满足一些朋友小成本大回报的需要。不满大家笑
话本人的纠偏原始数据是花了money买来的,如果你认为小弟这个dll对你有用你可以联系我http://item.taobao.com/item.htm?id=16817374622。本人有点势利让大家见笑了,不喜欢的绕开。