95 lines
4.0 KiB
XML
95 lines
4.0 KiB
XML
<UserControl x:Class="OperationControl.Controls.MapViewControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:m="clr-namespace:Mapsui.UI.Wpf;assembly=Mapsui.UI.Wpf"
|
|
xmlns:editing="clr-namespace:OperationControl.Mapas.Editing.Views"
|
|
x:Name="Root"
|
|
MinHeight="100"
|
|
MinWidth="300"
|
|
Focusable="True"
|
|
FocusVisualStyle="{x:Null}"
|
|
PreviewMouseLeftButtonDown="Root_PreviewMouseLeftButtonDown"
|
|
PreviewMouseMove="Root_PreviewMouseMove"
|
|
PreviewMouseLeftButtonUp="Root_PreviewMouseLeftButtonUp"
|
|
LostMouseCapture="Root_LostMouseCapture"
|
|
PreviewKeyDown="Root_PreviewKeyDown"
|
|
>
|
|
<Grid>
|
|
<!-- Mapsui MapControl preenche todo o espaço disponível (responsivo) -->
|
|
<m:MapControl x:Name="Mapa"/>
|
|
|
|
<!-- Overlay simples para mensagens (ex.: MBTiles não encontrado) -->
|
|
<Border x:Name="OverlayMessage" Background="#AA111111" CornerRadius="8" Padding="10" Margin="12" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Collapsed">
|
|
<TextBlock x:Name="OverlayText" Foreground="White" FontSize="12" TextWrapping="Wrap"/>
|
|
</Border>
|
|
|
|
<ComboBox x:Name="CmbBaseMap" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,70,0" Width="189" SelectionChanged="OnBaseMapChanged"/>
|
|
<CheckBox x:Name="chbAcompanhar" Content="Seguir" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,13,10,0"/>
|
|
|
|
<Button Content="Carregar Mapa" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,10,10" Padding="8,4" Background="#2ECC71" Foreground="White" FontWeight="Bold" Visibility="Collapsed"/>
|
|
<!--<Button Content="Centralizar" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,10,10" Padding="8,4" Background="#2ECC71" Foreground="White" FontWeight="Bold" Click="OnCenterAreaClicked"/>-->
|
|
|
|
<!-- INTERAÇÃO VISUAL DO EDITOR -->
|
|
<Canvas x:Name="EditorInteractionCanvas" Background="Transparent" IsHitTestVisible="False" Panel.ZIndex="90">
|
|
|
|
|
|
<!--
|
|
Área interna do recorte.
|
|
|
|
O Polygon já mostra visualmente
|
|
como o último ponto será fechado
|
|
até o primeiro.
|
|
-->
|
|
<Polygon
|
|
x:Name="EditorCutPolygonFill"
|
|
Visibility="Collapsed"
|
|
Fill="#38FF3B30"
|
|
Stroke="#99FF6B60"
|
|
StrokeThickness="1"
|
|
IsHitTestVisible="False"/>
|
|
|
|
|
|
<!-- Linha realmente percorrida pelo mouse -->
|
|
<Polyline
|
|
x:Name="EditorCutPolyline"
|
|
Visibility="Collapsed"
|
|
Stroke="#FFFF675C"
|
|
StrokeThickness="3"
|
|
StrokeLineJoin="Round"
|
|
StrokeStartLineCap="Round"
|
|
StrokeEndLineCap="Round"
|
|
IsHitTestVisible="False"/>
|
|
|
|
|
|
<!--
|
|
Ligação visual do último ponto
|
|
até o primeiro.
|
|
-->
|
|
<Line
|
|
x:Name="EditorCutClosingLine"
|
|
Visibility="Collapsed"
|
|
Stroke="#CCFFB0AA"
|
|
StrokeThickness="2"
|
|
StrokeDashArray="4,3"
|
|
IsHitTestVisible="False"/>
|
|
|
|
|
|
<Canvas x:Name="EditorCutVerticesCanvas" IsHitTestVisible="False"/>
|
|
|
|
|
|
<!-- Seleção retangular existente -->
|
|
<Border
|
|
x:Name="EditorSelectionRectangle"
|
|
Visibility="Collapsed"
|
|
Background="#334E8EF7"
|
|
BorderBrush="#FF6BA6FF"
|
|
BorderThickness="2"
|
|
CornerRadius="2"/>
|
|
|
|
</Canvas>
|
|
|
|
<!-- COCKPIT DO EDITOR DE MAPAS -->
|
|
<editing:MapaEditorOverlay x:Name="EditorOverlay" Panel.ZIndex="100"/>
|
|
|
|
</Grid>
|
|
</UserControl> |