开发者社区> 暖枫无敌> 正文

ArcGIS API for Silverlight 点击地图弹出自定义窗体

简介: 在之前的博客中,关于弹出窗体,样式比较单一,不能满足自定义各种样式,源连接地址:http://blog.
+关注继续查看

在之前的博客中,关于弹出窗体,样式比较单一,不能满足自定义各种样式,源连接地址:http://blog.csdn.net/taomanman/article/details/7333612


下面是通过新建一个Silverlight的UserControl类,里面自定义样式,只要你能想到的,都可以做出来,然后在地图中点击点,实例化该类即可,主要代码如下:

<UserControl x:Class="MapClient.MapTip"
    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" Loaded="UserControl_Loaded" Width="400" Height="300">
    
    <Grid x:Name="LayoutRoot" Background="White" Width="400" Height="300">
    	<Path Data="M1,2 C1,1.4477153 1.4477153,1 2,1 L75,1 L198.18593,-66.997299 L138,1 L360,1 C360.55228,1 361,1.4477153 361,2 L361,255 C361,255.55229 360.55228,256 360,256 L2,256 C1.4477153,256 1,255.55229 1,255 z" Fill="#FFF4F4F5" Margin="0,-79,0,0" Stretch="Fill" Stroke="#FFDAD5D5" StrokeThickness="2" UseLayoutRounding="False" Width="400" Height="379">
    		<Path.Effect>
    			<DropShadowEffect Color="#FF645F5F"/>
    		</Path.Effect>
    	</Path>
    	<Grid Height="50" Margin="0,1,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="400">
    		<Border BorderBrush="#FF8F8F8F" BorderThickness="0" Margin="16,13,0,17" HorizontalAlignment="Left" Width="70" Background="#FF8F8F8F" Height="20" Cursor="Hand" ToolTipService.ToolTip="实时数据">
    			<TextBlock x:Name="tb_sssj" TextWrapping="Wrap" Width="65" Height="20" Text="实时数据" Foreground="Black" FontSize="13.333" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    		</Border>
    		<Border BorderBrush="#FF8F8F8F" BorderThickness="0" Margin="90,13,0,17" Background="#FF8F8F8F" Height="20" HorizontalAlignment="Left" Width="70" Cursor="Hand" ToolTipService.ToolTip="田间视频">
    			<TextBlock x:Name="tb_tjsp" TextWrapping="Wrap" Width="60" Height="20" Text="田间视频" Foreground="#FFFDFDFD" FontSize="13.333" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="tb_tjsp_MouseLeftButtonDown"/>
    		</Border>
    		<Border BorderBrush="#FF8F8F8F" BorderThickness="0" Margin="164,13,166,17" Background="#FF8F8F8F" Height="20" Cursor="Hand" ToolTipService.ToolTip="作物图片">
    			<TextBlock x:Name="tb_zwtp" TextWrapping="Wrap" Width="60" Height="20" Text="作物图片" Foreground="#FFFDFDFD" FontSize="13.333" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="tb_zwtp_MouseLeftButtonDown"/>
    		</Border>
    		<Border BorderBrush="#FF8F8F8F" BorderThickness="0" Margin="0,13,92,17" Background="#FF8F8F8F" Height="20" HorizontalAlignment="Right" Width="70" Cursor="Hand" ToolTipService.ToolTip="专家会议">
    			<TextBlock x:Name="tb_zjhy" TextWrapping="Wrap" Width="60" Height="20" Text="专家会议" Foreground="#FFFDFDFD" FontSize="13.333" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="tb_zjhy_MouseLeftButtonDown"/>
    		</Border>
    		<Border BorderBrush="#FF8F8F8F" BorderThickness="0" Margin="0,13,17,17" Background="#FF8F8F8F" Height="20" HorizontalAlignment="Right" Width="70" Cursor="Hand" ToolTipService.ToolTip="现场联动">
    			<TextBlock x:Name="tb_xcld" TextWrapping="Wrap" Width="60" Height="20" Text="现场联动" Foreground="#FFFDFDFD" FontSize="13.333" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="tb_xcld_MouseLeftButtonDown"/>
    		</Border>
    	</Grid>
    	<Grid Height="8" Margin="-2,41,2,0" VerticalAlignment="Top" Width="400">
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="4.404,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="187.829,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="177.824,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="167.819,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="158.481,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="149.81,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="139.805,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="130.467,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="120.462,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="111.124,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="101.786,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="92.448,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="83.777,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="74.439,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="65.768,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="55.763,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="46.425,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="37.087,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="29.75,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="22.413,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="13.742,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,187.162,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,177.824,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,168.486,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,158.481,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,149.81,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,140.472,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,130.467,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,120.462,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,111.791,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,101.786,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,92.448,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,83.11,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,73.772,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,65.101,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,56.43,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,47.759,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,38.421,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,29.083,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,19.745,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,10.407,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,1.736,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    	</Grid>
    	<Grid Margin="-2,0,2,58" Height="8" VerticalAlignment="Bottom" Width="400">
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="4.404,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="187.829,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="177.824,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="167.819,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="158.481,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="149.81,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="139.805,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="130.467,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="120.462,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="111.124,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="101.786,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="92.448,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="83.777,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="74.439,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="65.768,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="55.763,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="46.425,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="37.087,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="29.75,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="22.413,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="13.742,0,0,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Left" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,187.162,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,177.824,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,168.486,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,158.481,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,149.81,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,140.472,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,130.467,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,120.462,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,111.791,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,101.786,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,92.448,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,83.11,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,73.772,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,65.101,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,56.43,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,47.759,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,38.421,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,29.083,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,19.745,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,10.407,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    		<Path Data="M61.333332,0 L67.333336,0" Fill="#FFF4F4F5" Height="1" Margin="0,0,1.736,0" Stretch="Fill" Stroke="#FFDAD5D5" UseLayoutRounding="False" VerticalAlignment="Center" HorizontalAlignment="Right" Width="7"/>
    	</Grid>
    	<Grid Height="61" Margin="0" VerticalAlignment="Bottom" Width="400" Background="#FFE5E5E5">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="0.082*"/>
    			<ColumnDefinition Width="0.918*"/>
    		</Grid.ColumnDefinitions>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="0.327*"/>
    			<RowDefinition Height="0.337*"/>
    			<RowDefinition Height="0.337*"/>
    		</Grid.RowDefinitions>
    		<Ellipse Fill="#FFFDFDFD" HorizontalAlignment="Right" Margin="0,6,3,6" Stroke="#FF48C803" Width="8" Height="8"/>
    		<Ellipse Fill="#FFFDFDFD" HorizontalAlignment="Right" Margin="0,8,3,5" Stroke="#FF48C803" Width="8" Grid.Row="1" Height="8"/>
    		<Ellipse Fill="#FFFDFDFD" HorizontalAlignment="Right" Margin="0,7,3,5" Stroke="#FF48C803" Width="8" Grid.Row="2" Height="8"/>
    		<HyperlinkButton x:Name="btn1" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="4,1,0,1" FontSize="13.333" Foreground="Black" Click="btn1_Click" Height="20" ToolTipService.ToolTip="点击查看详情"/>
    		<HyperlinkButton x:Name="btn2" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="4,1,0,2" FontSize="13.333" Grid.Row="1" Foreground="Black" Click="btn2_Click" Height="20" ToolTipService.ToolTip="点击查看详情"/>
    		<HyperlinkButton x:Name="btn3" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="4,1,0,1" FontSize="13.333" Grid.Row="2" Foreground="Black" Click="btn3_Click" Height="20" ToolTipService.ToolTip="点击查看详情"/>
    	</Grid>
    	<Grid Height="20" Margin="0,49,0,0" VerticalAlignment="Top" Width="400">
    		<TextBlock x:Name="tb_title" HorizontalAlignment="Left" Margin="17,0,0,0" TextWrapping="Wrap" Width="153" FontSize="13.333" Height="20" Foreground="#FFFD9312"/>
    	</Grid>
    	<Grid Margin="0,69,0,66" Width="400" Height="165">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="0.155*"/>
    			<ColumnDefinition Width="0.672*"/>
    			<ColumnDefinition Width="0.172*"/>
    		</Grid.ColumnDefinitions>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="18"/>
    			<RowDefinition Height="19"/>
    			<RowDefinition Height="19"/>
    			<RowDefinition Height="20"/>
    			<RowDefinition Height="20"/>
    			<RowDefinition Height="21"/>
    			<RowDefinition Height="19"/>
    			<RowDefinition Height="20"/>
    			<RowDefinition Height="9"/>
    		</Grid.RowDefinitions>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_grade" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,2,0,-1" Grid.Row="1" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_area" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,3,0,-2" Grid.Row="2" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_variety" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,4,0,-2" Grid.Row="3" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_varietyType" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,4,0,-2" Grid.Row="4" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_zjyl" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,4,0,-1" Grid.Row="5" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_dzjn" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,3,0,-2" Grid.Row="6" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_csg" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    		<Border BorderBrush="#FFF9F00E" BorderThickness="0" Grid.Column="1" Background="#FFF9F00E" Margin="0,4,0,-2" Grid.Row="7" HorizontalAlignment="Left" Width="269" Height="20">
    			<TextBlock x:Name="tb_mjn" Margin="0,0,36,0" TextWrapping="Wrap" FontSize="13.333"/>
    		</Border>
    	</Grid>
    </Grid>
</UserControl>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MapClient.ServiceReference1;
using System.Windows.Browser;
using System.Windows.Controls.Primitives;
using ESRI.ArcGIS.Client;

namespace MapClient
{
    public partial class MapTip : UserControl
    {
        string _placeName = string.Empty; //监测点名称
        string _areaID = string.Empty; //地区编号
        string _monitorID = string.Empty; //监测点ID
        string _year = string.Empty; //年份
        string _issueNum = string.Empty; //期号
        string _cycleID = string.Empty; //生育周期ID
        string _seedingTypeID = string.Empty; //苗情等级ID

        private Point _location;
        private bool _isShowing;
        private Popup _popup;
        private Grid _grid;
        private Canvas _canvas;
        private FrameworkElement _content;

        //初始化并显示弹出窗体.公共方法在显示菜单项时调用
        public void Show(Point location)
        {
            if (_isShowing)
                throw new InvalidOperationException();
            _isShowing = true;
            _location = location;
            ConstructPopup();
            _popup.IsOpen = true;
        }

        //关闭弹出窗体
        public void Close()
        {
            _isShowing = false;
            if (_popup != null)
            {
                _popup.IsOpen = false;
            }
        }

        //Default behavior for OnClickOutside() is to close the context menu when there is a mouse click event outside the context menu
        protected virtual void OnClickOutside()
        {
            Close();
        }

        // 用Grid来布局,初始化弹出窗体
        //在Grid里面添加一个Canvas,用来监测菜单项外面的鼠标点击事件
        private void ConstructPopup()
        {
            if (_popup != null)
                return;
            _popup = new Popup();
            _grid = new Grid();
            _popup.Child = _grid;
            _canvas = new Canvas();
            _canvas.MouseLeftButtonDown += (sender, args) => { OnClickOutside(); };
            _canvas.MouseRightButtonDown += (sender, args) => { args.Handled = true; OnClickOutside(); };
            _canvas.Background = new SolidColorBrush(Colors.Transparent);
            _grid.Children.Add(_canvas);
            _content = this;
            _content.HorizontalAlignment = HorizontalAlignment.Left;
            _content.VerticalAlignment = VerticalAlignment.Top;
            _content.Margin = new Thickness(_location.X, _location.Y, 0, 0);
            _grid.Children.Add(_content);
            UpdateSize();
        }

        /// <summary>
        /// 更新大小
        /// </summary>
        private void UpdateSize()
        {
            _grid.Width = Application.Current.Host.Content.ActualWidth;
            _grid.Height = Application.Current.Host.Content.ActualHeight;
            if (_canvas != null)
            {
                _canvas.Width = _grid.Width;
                _canvas.Height = _grid.Height;
            }
        }

        public MapTip(string name, string areaID, string monitorID, string year, string cycleID, string issueNum, string seedingTypeID)
        {
            InitializeComponent();
            this._placeName = name;
            this._areaID = areaID;
            this._monitorID = monitorID;
            this._issueNum = issueNum;
            this._year = year;
            this._cycleID = cycleID;
            this._seedingTypeID = seedingTypeID;
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            getData1SoapClient client = new getData1SoapClient();
            client.GetMonitorInfoByIssueNumCompleted += new EventHandler<GetMonitorInfoByIssueNumCompletedEventArgs>(client_GetMonitorInfoByIssueNumCompleted);
            client.GetMonitorInfoByIssueNumAsync(_areaID, _monitorID, _year, _issueNum, _cycleID);
        }

        void client_GetMonitorInfoByIssueNumCompleted(object sender, GetMonitorInfoByIssueNumCompletedEventArgs e)
        {
            try
            {
                string result = e.Result;
                if (result.Split('|').Length == 1)
                {
                    this.tb_title.Text = _placeName;
                    this.tb_zjyl.Text = result.Split('|')[0].ToString();
                    this.tb_zjyl.Foreground = new SolidColorBrush(Colors.Red);
                    this.tb_zjyl.HorizontalAlignment = HorizontalAlignment.Center;
                }
                else
                {
                    this.tb_title.Text = result.Split('|')[0].ToString(); //标题
                    this.tb_grade.Text = result.Split('|')[1].ToString(); //所属类型
                    this.tb_area.Text = result.Split('|')[2].ToString(); //代表面积
                    this.tb_variety.Text = result.Split('|')[3].ToString(); //品种
                    this.tb_varietyType.Text = result.Split('|')[4].ToString(); //品种类型
                    switch (_cycleID)
                    {
                        case "5":
                            //越冬期
                            this.tb_zjyl.Text = result.Split('|')[5].ToString(); //主茎叶龄
                            this.tb_dzjn.Text = result.Split('|')[6].ToString(); //单株茎蘖
                            this.tb_csg.Text = result.Split('|')[7].ToString(); //次生根
                            this.tb_mjn.Text = result.Split('|')[8].ToString(); //亩茎蘖
                            break;
                        case "6":
                            //返青期
                            this.tb_zjyl.Text = result.Split('|')[5].ToString(); //主茎叶龄
                            this.tb_dzjn.Text = result.Split('|')[6].ToString(); //单株茎蘖
                            this.tb_csg.Text = result.Split('|')[7].ToString(); //次生根
                            this.tb_mjn.Text = result.Split('|')[8].ToString(); //亩茎蘖
                            break;
                        case "8":
                            //拔节期
                            this.tb_zjyl.Text = result.Split('|')[5].ToString(); //主茎叶龄
                            this.tb_dzjn.Text = result.Split('|')[6].ToString(); //单株茎蘖
                            this.tb_csg.Text = result.Split('|')[7].ToString(); //亩茎蘖
                            break;
                        case "10":
                            //抽穗期
                            this.tb_zjyl.Text = result.Split('|')[5].ToString(); //主茎叶龄
                            this.tb_dzjn.Text = result.Split('|')[6].ToString(); //亩茎蘖
                            break;
                    }
                    //苗情评价分析
                    btn1.Content = result.Split('|')[0].ToString().Split(')')[0] + ")苗情评价信息";
                    //苗情数据报表
                    btn2.Content = result.Split('|')[0].ToString().Split(')')[0] + ")小麦苗情数据报表";
                    //苗情监测报告
                    btn3.Content = result.Split('|')[0].ToString().Split(')')[0] + ")苗情监测报告";
                }
            }
            catch (Exception)
            {
                this.tb_title.Text = _placeName;
                this.tb_zjyl.Text = "暂无数据!";
                this.tb_zjyl.Foreground = new SolidColorBrush(Colors.Red);
                this.tb_zjyl.HorizontalAlignment = HorizontalAlignment.Center;
            }
        }

        void btn1_Click(object sender, RoutedEventArgs e)
        {
            //页面跳转后并关闭当前弹出窗体
            try
            {
                ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeMenuName") as ScriptObject;
                string firstMenuName = "农情分析";
                string secondMenuName = "苗情评价";
                string menuName = "GIS地图监测点小麦苗情评价";
                string str = "?pAreaType=&pCounty=" + _areaID + "&pYear=" + _year + "&pPeriod=" + _issueNum + "&pStageID=" + _cycleID + "&pSeedlingType=" + _seedingTypeID + "&pMonitorID=" + _monitorID;
                SetMaterial.InvokeSelf(firstMenuName, secondMenuName, menuName, str);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            Close();
        }

        void btn2_Click(object sender, RoutedEventArgs e)
        {
            //页面跳转后并关闭当前弹出窗体
            ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情分析";
            string secondMenuName = "苗情分布统计分析";
            string thirdMenuName = "苗情分布统计";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }

        void btn3_Click(object sender, RoutedEventArgs e)
        {
            //页面跳转后并关闭当前弹出窗体
            ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情管理";
            string secondMenuName = "信息录入";
            string thirdMenuName = "小麦苗情监测报告";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }


        private void tb_zjhy_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            //专家会议
            ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情监控";
            string secondMenuName = "农情监控";
            string thirdMenuName = "农田监控";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }

        private void tb_xcld_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            //现场联动
            ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情监控";
            string secondMenuName = "农情监控";
            string thirdMenuName = "农田图像监控";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }

        private void tb_tjsp_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
        	// 田间视频
			ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情监控";
            string secondMenuName = "农情监控";
            string thirdMenuName = "农田图像监控";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }

        private void tb_zwtp_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
        	// 作物图片
			ScriptObject SetMaterial = HtmlPage.Window.GetProperty("GotoHomeUrlStr") as ScriptObject;
            string firstMenuName = "农情监控";
            string secondMenuName = "农情监控";
            string thirdMenuName = "农田图像监控";
            string str = "?AreaName=" + _placeName;
            SetMaterial.InvokeSelf(firstMenuName, secondMenuName, thirdMenuName, str);
            Close();
        }

    }
}

         #region 鼠标左键事件开始
        void Feature_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            //鼠标左键,显示ToolTip信息
            Graphic g = sender as Graphic;
            for (int i = 0; i < areaId.Length; i++)
            {
                if (areaId[i] == g.Attributes["Id"].ToString())
                {
                    //弹出对应的提示信息
                    MapTip tip = new MapTip(g.Attributes["Name"].ToString(), g.Attributes["AreaID"].ToString(), areaId[i], year[i], cycleId[i], issueNum[i], seedlingType[i]);
                    Point p = e.GetPosition(LayoutRoot);
                    p.X = p.X - 220;
                    p.Y = p.Y + 80;
                    tip.Show(p);
                }
            }
        }

效果如下图所示:



版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
如何利用【百度地图API】,制作房产酒店地图?(上)——制作自定义标注和自定义信息窗口
原文:如何利用【百度地图API】,制作房产酒店地图?(上)——制作自定义标注和自定义信息窗口 摘要:   想亲手制作一张酷讯、去哪儿、安居客、链接地产那样的房产、酒店地图麼?那赶快来学习吧。(以酷讯为例,如下图)      更多成功案例请点击:http://dev.
1182 0
ArcEngine在地图上加载Server图层数据
版权声明:欢迎评论和转载,转载请注明来源。 https://blog.csdn.net/zy332719794/article/details/22183775         加载Server图层数据需要指定两个参数,第一是服务的Url地址,第二是服务中的数据对象名称Name。
851 0
ArcGIS API for Silverlight 点击地图弹出自定义窗体
在之前的博客中,关于弹出窗体,样式比较单一,不能满足自定义各种样式,源连接地址:http://blog.
497 0
ArcGIS API for Silverlight 鼠标移入移出地图要素弹出窗口(优化处理)
     在之前博客里的ArcGIS API for Silverlight 弹出框实例中,是通过点击地图要素,弹出框,但是由于没有控制元素个数,只是通过显示隐藏来进行的话,在鼠标移入和移出操作中,会出现鼠标移入的时候,总不能立刻弹出框,而是需要多次才行,用户体验较差,现在通过控制加入一个弹出框,移出时去除刚加入的弹出框,严格控制弹出框个数来实现。
857 0
ArcGIS API for Javascript 3.21地图开发实例(一、图形绘制和删除及popup弹出层)
前言 Arcgis是一个地理系统的平台,可用来进行数据数据展示或二次开发。这里我们所使用的是Arcgis对于JavaScript的api,也就是web端的api进行开发。
9703 0
Qt编写数据可视化大屏界面电子看板11-自定义控件
一、前言 说到自定义控件,我是感觉特别熟悉的几个字,本人亲自原创的自定义控件超过110个,都是来自各个行业的具体应用真实需求,而不是凭空捏造的,当然有几个小控件也有点凑数的嫌疑,在编写整个数据可视化大屏界面电子看板系统中,也用到了四五个自定义的控件,比如那个环形百分比图,多态进度条,合格率仪表盘,速度仪表盘等,这些控件在现有的类中是没有的,需要用QPainter这个牛逼的工具来绘制,类似于神笔马良似的,给我一个画笔,可以画出任意你想要的图形,好比我常说的心中有坐标,万物皆painter。
1177 0
+关注
625
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载