首页 > 代码库 > 书签,鹰眼
书签,鹰眼
前台
<StackPanel Grid.Column="5" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="5"> <Button Name="Btn_Bookmark" Content="书签" Click="Btn_Bookmark_Click_1"></Button> <Button Name="Btn_OverviewMap" Content="鹰眼" Click="Btn_OverviewMap_Click_1"></Button> </StackPanel>
<esri:OverviewMap x:Name="mOverviewMap" Grid.ColumnSpan="1" Map="{Binding ElementName=china}"> <esri:OverviewMap.Layer> <esri:ArcGISTiledMapServiceLayer ID="StreetLayer" Url="http://localhost/arcgis/rest/services/Map/MapServer"/> </esri:OverviewMap.Layer> </esri:OverviewMap>
<esri:Bookmark Name="mBookMark" Visibility="Collapsed" Margin="0,-2,0,0" VerticalAlignment="Top" Map="{Binding ElementName=china}" Grid.Column="4" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" />
后台
namespace china { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void Btn_Bookmark_Click_1(object sender, RoutedEventArgs e) { if (mBookMark.Visibility == Visibility.Collapsed) { mBookMark.Visibility = Visibility.Visible; } else mBookMark.Visibility = Visibility.Collapsed; }
private void Btn_OverviewMap_Click_1(object sender, RoutedEventArgs e) { if (mOverviewMap.Visibility == Visibility.Collapsed) { mOverviewMap.Visibility = Visibility.Visible; } else mOverviewMap.Visibility = Visibility.Collapsed; } }
}
书签,鹰眼