mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Reworked sample applications
This commit is contained in:
parent
32491a8e31
commit
fd7b53a37b
|
|
@ -5,10 +5,6 @@
|
|||
xmlns:map="using:MapControl"
|
||||
xmlns:local="using:SampleApplication">
|
||||
|
||||
<Page.DataContext>
|
||||
<local:MapViewModel/>
|
||||
</Page.DataContext>
|
||||
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.Resources>
|
||||
<DataTemplate x:Key="PolylineItemTemplate">
|
||||
|
|
@ -84,6 +80,10 @@
|
|||
</Style>
|
||||
</Grid.Resources>
|
||||
|
||||
<Grid.DataContext>
|
||||
<local:MapViewModel/>
|
||||
</Grid.DataContext>
|
||||
|
||||
<map:Map x:Name="map"
|
||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" ManipulationMode="All"
|
||||
MapLayer="{Binding MapLayers[OpenStreetMap]}"
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
<map:Map x:Name="map"
|
||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" MouseWheelZoomDelta="1"
|
||||
MapLayer="{Binding MapLayers[OpenStreetMap]}"
|
||||
ViewportChanged="MapViewportChanged"
|
||||
PointerMoved="MapPointerMoved"
|
||||
PointerExited="MapPointerExited">
|
||||
<map:Map.Center>
|
||||
|
|
@ -113,7 +112,8 @@
|
|||
</map:Map>
|
||||
|
||||
<Border HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="#AFFFFFFF">
|
||||
<TextBlock Margin="4,2" FontSize="10" local:HyperlinkText.InlinesSource="{Binding MapLayer.Description, ElementName=map}"/>
|
||||
<TextBlock Margin="4,2" FontSize="10"
|
||||
local:HyperlinkText.InlinesSource="{Binding MapLayer.Description, ElementName=map}"/>
|
||||
</Border>
|
||||
|
||||
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="6">
|
||||
|
|
|
|||
|
|
@ -53,11 +53,6 @@ namespace SampleApplication
|
|||
await ((ImageFileCache)TileImageLoader.Cache).Clean();
|
||||
}
|
||||
|
||||
private void MapViewportChanged(object sender, ViewportChangedEventArgs e)
|
||||
{
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void MapPointerMoved(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
var location = map.ViewToLocation(e.GetCurrentPoint(map).Position);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@
|
|||
<local:MapViewModel/>
|
||||
</Grid.DataContext>
|
||||
|
||||
<map:Map x:Name="map" ZoomLevel="11" MaxZoomLevel="21" MouseWheelZoomDelta="1"
|
||||
<map:Map x:Name="map"
|
||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" MouseWheelZoomDelta="1"
|
||||
Center="53.5,8.2"
|
||||
MapLayer="{Binding MapLayers[OpenStreetMap]}"
|
||||
MouseLeftButtonDown="MapMouseLeftButtonDown"
|
||||
|
|
|
|||
Loading…
Reference in a new issue