-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
84 lines (84 loc) · 4.6 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
x:Class="MapLesson2.MainWindow"
Title="MainWindow" Height="412" Width="734">
<Grid>
<dxm:MapControl MaxZoomLevel="3"
Background="White">
<dxm:MapControl.Legends>
<dxm:ColorListLegend Header="Room Type"
Layer="{Binding ElementName=vectorLayer, Mode=OneWay}"/>
</dxm:MapControl.Legends>
<dxm:MapControl.CenterPoint>
<dxm:CartesianPoint X="-82" Y="-47"/>
</dxm:MapControl.CenterPoint>
<dxm:MapControl.CoordinatesPanelOptions>
<dxm:CoordinatesPanelOptions Visible="False"/>
</dxm:MapControl.CoordinatesPanelOptions>
<dxm:MapControl.ScalePanelOptions>
<dxm:ScalePanelOptions Visible="False"/>
</dxm:MapControl.ScalePanelOptions>
<dxm:MapControl.CoordinateSystem>
<dxm:CartesianMapCoordinateSystem/>
</dxm:MapControl.CoordinateSystem>
<dxm:VectorLayer x:Name="vectorLayer">
<dxm:VectorLayer.Colorizer>
<dxm:KeyColorColorizer>
<dxm:KeyColorColorizer.ItemKeyProvider>
<dxm:AttributeItemKeyProvider AttributeName="CATEGORY"/>
</dxm:KeyColorColorizer.ItemKeyProvider>
<dxm:KeyColorColorizer.Keys>
<dxm:ColorizerKeyItem Name="Restaurant">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>1</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Business Room">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>2</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Bathroom">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>3</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Living Room">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>4</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Other">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>5</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Service Room">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>6</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Pool">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>7</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
<dxm:ColorizerKeyItem Name="Gym">
<dxm:ColorizerKeyItem.Key>
<sys:Int32>8</sys:Int32>
</dxm:ColorizerKeyItem.Key>
</dxm:ColorizerKeyItem>
</dxm:KeyColorColorizer.Keys>
</dxm:KeyColorColorizer>
</dxm:VectorLayer.Colorizer>
<dxm:ShapefileDataAdapter FileUri="Data/Hotel1.shp">
<dxm:ShapefileDataAdapter.SourceCoordinateSystem>
<dxm:CartesianSourceCoordinateSystem/>
</dxm:ShapefileDataAdapter.SourceCoordinateSystem>
</dxm:ShapefileDataAdapter>
</dxm:VectorLayer>
</dxm:MapControl>
</Grid>
</Window>