当前位置:编程学习 > 网站相关 >>

苦恼N天!Silverlight无法显示本机发布的MapServer,已复制clientaccesspolicy.xml文件

本人在本机用ArcGIS Server发布了一个MapService,在ArcGIS Server Manager里

面能正常显示服务(看得到缩略地图),可在一个新建的silverlight应用程序里就是显示

不了地图,已经复制clientaccesspolicy.xml文件至C:\inetpub\wwwroot目录下,XAML如

下:
<UserControl x:Class="SilverlightApplication.MainPage"    
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     
  xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
  <Grid x:Name="LayoutRoot">
    <esri:Map x:Name="MyMap" >
      <esri:ArcGISTiledMapServiceLayer ID="MyMapLayer" 

Url="http://minxing/ArcGIS//services/binhai/MapServer"/>
    </esri:Map>
  </Grid>
</UserControl>
困扰N天不得其解,求高手解救! --------------------编程问答-------------------- 太简单的原因了,你REST服务的Url地址写错了,能显示出地图才怪呢

Url="http://minxing/ArcGIS/rest/services/binhai/MapServer"


还有你在ArcGIS中为你的binhai做过Cache了吗?没有的话,不能使用ArcGISTiledMapServiceLayer的,得使用ArcGISDynamicMapServiceLayer --------------------编程问答-------------------- 楼上正解,同意楼上的看法
补充:企业软件 ,  地理信息系统
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,