Skip to content

Commit 4888f02

Browse files
#1: Added a message view model for creating the message layer displaying the NVG elements as messages.
1 parent a79dc14 commit 4888f02

File tree

4 files changed

+47
-1
lines changed

4 files changed

+47
-1
lines changed

NVGViewer/NVGViewer/MainWindow.xaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
Grid.Row="0"
1818
AllowDrop="True"
1919
LayerLoaded="FocusMapViewLayerLoaded"
20-
Drop="FocusMapViewDropped">
20+
Drop="FocusMapViewDropped"
21+
SpatialReferenceChanged="FocusMapViewSpatialReferenceChanged">
2122
<esri:Map>
2223
<esri:ArcGISTiledMapServiceLayer ID="Basemap"
2324
ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>

NVGViewer/NVGViewer/MainWindow.xaml.cs

+10
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
using Esri.ArcGISRuntime.Controls;
1818
using MahApps.Metro.Controls;
1919
using NVGViewer.ViewModel;
20+
using System;
21+
using System.ComponentModel;
2022
using System.Diagnostics;
2123
using System.Threading.Tasks;
2224
using System.Windows;
@@ -74,5 +76,13 @@ private void FocusMapViewDropped(object sender, DragEventArgs e)
7476
mainViewModel.EndLoadingFiles();
7577
}, TaskScheduler.FromCurrentSynchronizationContext());
7678
}
79+
80+
private void FocusMapViewSpatialReferenceChanged(object sender, EventArgs e)
81+
{
82+
if (null != FocusMapView.SpatialReference)
83+
{
84+
// Create the message processor
85+
}
86+
}
7787
}
7888
}

NVGViewer/NVGViewer/NVGViewer.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
</ApplicationDefinition>
8585
<Compile Include="Commands\LoadNvgFileCommand.cs" />
8686
<Compile Include="ViewModel\MainViewModel.cs" />
87+
<Compile Include="ViewModel\MessageViewModel.cs" />
8788
<Compile Include="ViewModel\ViewModelLocator.cs" />
8889
<Page Include="MainWindow.xaml">
8990
<Generator>MSBuild:Compile</Generator>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2016 Jan Tschada
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
using Esri.ArcGISRuntime.Symbology.Specialized;
18+
using GalaSoft.MvvmLight;
19+
using NVG.Data;
20+
21+
namespace NVGViewer.ViewModel
22+
{
23+
/// <summary>
24+
/// The view model for the messages.
25+
/// </summary>
26+
public class MessageViewModel : ViewModelBase
27+
{
28+
public MessageLayer CreateMessageLayer(NvgElement nvgElement)
29+
{
30+
// TODO: Create the message layer containing all messages of the NVG element
31+
return null;
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)