zoukankan      html  css  js  c++  java
  • Arcgis silverlight1 地图显示

     1、功能:地图显示

    建立一个silverlight程序

    MainPage.xmal中的代码:

     

    代码
    <UserControl x:Class="SilverlightApplication1.MainPage"
        xmlns=
    "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x=
    "http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d=
    "http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc=
    "http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable=
    "d"
        d:DesignHeight=
    "300" d:DesignWidth="400" xmlns:esri="http://schemas.esri.com/arcgis/client/2009">

        <
    Grid x:Name="LayoutRoot" Background="White">
            
            <
    esri:Map x:Name="MyMap" >
                <
    esri:ArcGISDynamicMapServiceLayer ID="ditu_quhua" Opacity="0.6" 
                        Url
    ="http://192.168.1.14:8081/scyc/rest/services/ditu_quhua(WGS_1984)/MapServer" />
            </
    esri:Map>

        </
    Grid>
    </
    UserControl>

     

    2、代码详解:

    //以下4行添加一个XML命名空间,用来调用ArcGIS schema for Silverlight/WPF,使用ESRI.ArcGIS.Client, ESRI.ArcGIS.Client.Behaviors, and ESRI.ArcGIS.Client.Toolkit assemblies

    <UserControl x:Class="SilverlightApp.Page"   

    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" Background="White">//添加一个容器grid,保存地图控件mapcontrol

     

    <esri:Map x:Name="MyMap" >//地图名称

      <esri:ArcGISDynamicMapServiceLayer ID="ditu_quhua" Opacity="0.6" 
                        Url
    ="http://192.168.1.14:8081/scyc/rest/services/ditu_quhua(WGS_1984)/MapServer" />
    //设置地图服务网址Url,地图图层ID,图层透明度Opacity

            

    </esri:Map>

    </Grid>

    </UserControl>

     

    3、功能展示

     

     

  • 相关阅读:
    硬盘任性丢数据,但分布式存储一定可靠吗?
    Service的基本组成
    固定cell.imageView.image的大小
    剪贴板服务
    取得正在运行的Activity
    取得正在运行的服务
    C#.NET学习笔记1---C#.NET简介
    取得手机的网络信息
    四、cocos2dx动画Animation介绍
    C#.NET学习笔记2---C#.第一个C#程序
  • 原文地址:https://www.cnblogs.com/king1302217/p/1749790.html
Copyright © 2011-2022 走看看